c++ 函数指针

来源:互联网 发布:1024邀请码多少钱淘宝 编辑:程序博客网 时间:2024/06/04 19:06
#include<iostream>using namespace std;//typedef int (*PGET)(int);int get(int a){    cout<<__func__<<" "<<a<<endl;    return a;}using PGET = int(*)(int);//int (*pget)(int) = get;PGET pget  = get;int main(){    pget(200);    (*pget)(100);    return 0;}
0 0