#include <iostream>
using namespace std;
class FuncReturnItself;
typedef FuncReturnItself (*pFunc)(void);
class FuncReturnItself{
public:
FuncReturnItself( pFunc _p ){
_pFunc = _p;
}
operator pFunc(){
return _pFunc;
}
private:
pFunc _pFunc;
};
FuncReturnItself demoFunc(){
cout << "deomFunc" << endl;
return demoFunc;
}
int _tmain(int argc, _TCHAR* argv[])
{
pFunc p = demoFunc();
p();
system("pause");
return 0;
}