函数指针(函数名作为函数参数)

函数名字就是函数指针

函数指针作为函数参数传递

如:

int A(int a,int b);

B(arg_list,int (*pA)(int, int));

函数B调用如下:

B(...,A);

函数A作为参数传递给函数B

这种用法要注意!!!

参考:https://www.cnblogs.com/jainszhang/p/10704514.html

猜你喜欢

转载自blog.csdn.net/qq_37407054/article/details/108968748
今日推荐