老电影神话片龙女:main()函数的特殊用法

来源:百度文库 编辑:高考问答 时间:2024/04/28 02:59:24
#include <stdio.h>
void test()
{
printf("I am test()!\n");
}

void (*main())()
{
printf("I an main() !\n");
return &test;
}
/*
结果只有I am main()!
而没有 I am test()!
请问怎么修改???
*/

双引号里的东西都会被认为是字符串。

把return &test; 改为test();

这是怎么回事啊