c++中函数指针作为int传递
int f() { return 0; } typedef int (*method)(); int _tmain(int argc, _TCHAR* argv[]) { int value = (int)&f; std::cout << value << std::endl; method fm = (method)value; int x = fm(); cout<<"over"<<endl; int a; cin>>a; return 0; }
桂棹兮兰桨,击空明兮溯流光。