64,680
社区成员
发帖
与我相关
我的任务
分享
typedef int func(int*,int);
typedef int(*func)(int*,int);
typedef int(*func(int*,int));
typedef int func(int*,int);
void f1(func); //形参可以这么写
func f2(int); //错误,因为f2返回函数类型
func *f3(int); //正确,因为返回指向函数指针
//下面的都是正确的(这个很奇怪)
typedef int(*func)(int*,int);
void f1(func);
func f2(int);
func *f3(int);
typedef int(*func(int*,int));
void f1(func);
func f2(int); //错误
func *f3(int);
//下面的都是正确的(这个很奇怪)
typedef int(*func)(int*,int);
// 参数类型为“函数指针”
void f1(func);
// 返回值类型为“函数指针”
func f2(int);
// 返回值类型为“指向函数指针的指针”
func *f3(int);