函数指针的简单使用

#include<iostream>
using namespace std;
int func(int a, int b){
	cout<<"func"<<endl;
}

typedef int(MY_FUNC)(int ,int);
int main(){
	MY_FUNC *fp = func;
	fp(10,20);
	return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_40945306/article/details/94657880
今日推荐