c++ 函数指针

#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;
}
posted @ 2016-03-30 10:19  夜色下的港湾  Views(65)  Comments(0Edit  收藏  举报