1.函数指针声明
typedef 返回类型(*函数指针类型名)(函参列表);
例子:
typedef int (*pf)(const int& a,const int& b);
2.函数指针例子
fox64194167 ©著作权
typedef 返回类型(*函数指针类型名)(函参列表);
例子:
typedef int (*pf)(const int& a,const int& b);
#include <iostream>using namespace std;typedef int int32_t;struct IMsgBody{ int body;};s
c(int *a) { printf("value is %d \n"...
函数作为参数传递 1. 函数本身是可以作为参数,传入另一个函数中进行使用的。 2. 将函数传入
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M