65,186
社区成员




int test();
int (*foo())();
int test() {
printf("test\n");
return 0;
}
int (*foo())()
{
return test;
}
#include <iostream>
using std::cout;
using std::endl;
typedef int (*PF)();
PF foo();
int f();
PF foo()
{
cout << "foo test"<<endl;
int (*pf)();
pf = &f;
pf();
return pf;
}
int f()
{
cout <<"f test"<<endl;
return 1;
}
int main()
{
PF pfunc = foo();
pfunc();
return 0;
}
typedef int(*F)();
F fo2();