使用#define ##拼接函数,模式化注册函数(ffmpeg 中的av_register_all)
来源:互联网 发布:农行软件开发中心待遇 编辑:程序博客网 时间:2024/06/18 04:45
#define 使用##,起到拼接作用。可以用来系统初始化的时候统一注册函数。(ffmpeg 中的av_register_all)
学以致用:
#include <stdio.h>#include <stdlib.h>#include <string.h>#define CONFIG_INT_ADD 1void add_int_ab(int a,int b){printf ("\n === %d ===\n",a+b);}void (*p)(int a,int b);#define REGISTER_ADD(X, x) \ { \ if (CONFIG_##X##_ADD) \ p = add_##x##_ab; \ }int main(){REGISTER_ADD(INT, int);p(444,222);return 0;}
0 0
- 使用#define ##拼接函数,模式化注册函数(ffmpeg 中的av_register_all)
- ffmpeg 函数简单分析 : av_register_all()
- av_register_all函数分析
- ffmpeg 注册函数
- ffmpeg学习(5)——av_register_all()
- FFMpeg 源码分析(1)av_register_all()
- FFMpeg中的函数
- FFMpeg中的函数
- ffmpeg av_register_all 异常
- define函数
- #define函数
- ffmpeg中av_find_best_stream()函数的使用
- ffmpeg.c中的主要函数
- ffmpeg.c中的主要函数
- ffmpeg源码简析(二)av_register_all(),avcodec_register_all()
- MySQL中的字符串拼接函数详解
- sql 函数字符串拼接函数concat()
- linux sigaction函数(注册信号)使用
- Android 4.4.2 横屏应用如何隐藏状态栏和底部虚拟键
- POJ 3487 The Stable Marriage Problem(稳定婚姻问题)
- Http协议
- 软件测试方法大汇总
- MySql安装与使用图文教程
- 使用#define ##拼接函数,模式化注册函数(ffmpeg 中的av_register_all)
- Android6.0 MediaScanner多媒体文件开机扫描及修改默认铃声(一)
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- Jquery相关总结
- 用PHP简单地备份mysql数据库
- Linux中Mongodb的安装(32位操作系统)
- 老说自己记性不好是因为你状态一开始就不对
- Apache虚拟主机配置
- 使用Hibernate生成数据库和连接数据库