typedef int(init_fnc_t) (void);
来源:互联网 发布:struct node *link,*p 编辑:程序博客网 时间:2024/05/20 22:39
typedef int(init_fnc_t) (void);
这个就是一个取别名的过程。我们通常情况下会如下使用typedef:
typedef unsigned char uint8_t;
uint8_t i;
这个时候我们的uint8_t就和unsigned char是一样的意思;而对于函数的声明我们通常会这样声明:
int Func(void);此时表示声明了一个函数名为Func的函数,函数没有任何的形参,返回值类型为int型。而对于:
typedef int(init_fnc_t) (void);
就是对一个int (void)类型的函数类型进行取别名init_fnc_t。我们可以利用这个别名进行创建这个类型的函数对象。
init_fnc_t *MyFunc;
这里就是一个函数的指针。如果某个函数的类型和这个函数一样,那么可以将这个函数的指针指向该函数,然后你就可以直接调用MyFunc()了。
原文章:typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void);
0 0
- typedef int (init_fnc_t) (void);
- typedef int(init_fnc_t) (void);
- typedef int (init_fnc_t) (void)和typedef int (*init_fnc_t) (void)
- typedef int (init_fnc_t) (void)和typedef int (*init_fnc_t) (void)
- typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void);
- typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void);
- typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void);
- typedef int (init_fnc_t) (void)和typedef int (*init_fnc_t) (void)
- typedef int (init_fnc_t) (void)和typedef int (*init_fnc_t) (void) 区别
- typedef int (init_fnc_t) (void)和typedef int (*init_fnc_t) (void)
- typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void);
- typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void)
- typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void)
- typedef int (init_fnc_t) (void)和typedef int (*init_fnc_t) (void)
- typedef int(init_fnc_t) (void)的解释
- Linux内核之 “typedef int (init_fnc_t) (void);”
- OMAPL138学习---typedef int(init_fnc_t)(void)
- uboot中typedef int (init_fnc_t) (void);详解
- sync kernel
- 死亡诗社 里的诗歌
- 我的博客正式开通啦!!!
- Poj 2559 最大矩形面积 v单调栈
- Lua 与C交互
- typedef int(init_fnc_t) (void);
- RichEdit显示行号
- 寻找两个等size有序数组的中位数
- 关于瀑布流和回到顶部的功能的冲突解决
- linux 流量监控
- Nginx 负载均衡
- bzoj1497 最大获利 最大权闭合图
- 如何获得线程的返回值?
- Unity3D技术之资源数据库 (AssetDatabase)详解