#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
int add(int a, int b) {
return a + b;
}
int main()
{
int (*fun)(int, int) = add;
cout << fun(1, 2) << endl;
return 0;
}
C++中函数指针的声明与使用实例
猜你喜欢
转载自blog.csdn.net/weixin_43869898/article/details/108568478
今日推荐
周排行