65,211
社区成员
发帖
与我相关
我的任务
分享
class CTest{
public:
void f(void){cout<<"CTest::f()"<<endl;}
};
void main(){
typedef void (*GFPtr)(void);//这行不懂
GFPtr fp=CTest::f;
fp();
}
#include <iostream>
using namespace std;
class CTest{
public:
void f(void){cout<<"CTest::f()"<<endl;}
};
void main(){
typedef void (CTest::*GFPtr)(void);//这行不懂
GFPtr fp=&CTest::f;
CTest t;
(t.*fp)();
}