C++函数指针和回调函数
函数指针的声明
函数指针可以只写数据类型,不写形参的变量名
int (*pfa)(int, string);
bool (*pfb)(int, string);
bool (*pfc)(int);
int (*pfa)(int a, string b);
bool (*pfb)(int a, string b);
bool (*pfc)(int a);
函数指针的使用
void func(int no, string str)
{
cout<<no<<str&.
原创
2022-04-19 20:18:50 ·
380 阅读 ·
0 评论