![]() |
#2
JYIT2012-10-21 16:28
|
class Test
{
public:
void (test::*fp)(void);
void fun()
{
printf("Test fun \n");
return ;
}
void init()
{
fp=fun;
return ;
}
};
main()
{
Test t;
t.init();
t.fp();//////这里编译出错error C2064: term does not evaluate to a function
}
我要如何才能通过指针去调用fun函数