c++ 函数指针
程序员文章站
2022-05-30 09:27:47
``` include include using namespace std; int max(int a,int b){ return a b ? a: b; } int main() { int ( func)(int,int); func = max; int a = 10,b=11; co ......
#include <iostream> #include <cstring> using namespace std; int max(int a,int b){ return a > b ? a: b; } int main() { int (*func)(int,int); func = max; int a = 10,b=11; cout << (*func)(a,b) << endl; }
上一篇: JSON在PHP中的基本应用
下一篇: Centos7下安装mysql服务