typedef int(init_fnc_t) (void);这句话是什么意思啊?
如果定义的是函数指针的话int(*init_fnc_t) (void);
应该有这个星号吧?
typedef int(*init_fnc_t) (void);
init_fnc_t pinit_fnc_t;和
typedef int(init_fnc_t) (void);
init_fnc_t *pinit_fnc_t;
两者一样
就像
typedef int apple;
typedef int* orange;
之间的区别
本文探讨了C语言中函数指针的定义方式及其使用场景。通过对比不同定义语法,如typedef int(init_fnc_t)(void)与typedef int(*init_fnc_t)(void),解析了它们之间的区别和联系。此外,还解释了函数指针如何被声明为变量,并提供了具体的例子。
449

被折叠的 条评论
为什么被折叠?



