|

楼主 |
发表于 2009-4-22 13:08:46
|
显示全部楼层
Post by khc;1977752
你把你試過的發上來吧
OK.这样的话:
#include "stdio.h"
int * a(void);
int * b(void);
int * c(void);
int main(void)
{
void * (* f)(void) = a;
( f() )();
return 0;
}
int * a(void)
{
printf("This is the 'a' function.\n");
return b;
}
int * b(void)
{
printf("This is the 'b' function.\n");
return c;
}
int * c(void)
{
printf("This is the 'c' function.\n");
return a;
}
编译时会说:
error:called object 'f()' is not a function |
|