typedef int(FUNC1)(int);
typedef int(FUNC2)(int*,int*,int*);
FUNC2* a = testFunc;
定义了两个自己的数据类型FUNC1和FUNC2,这两个类型申明的变量用保存函数
int (*func)(int,int);
func = testFunc2
变量 func 是个函数指针。
函数指针和函数指针类型
阅读 79
2023-04-17
typedef int(FUNC1)(int);
typedef int(FUNC2)(int*,int*,int*);
FUNC2* a = testFunc;
定义了两个自己的数据类型FUNC1和FUNC2,这两个类型申明的变量用保存函数
int (*func)(int,int);
func = testFunc2
变量 func 是个函数指针。
相关推荐
精彩评论(0)