since then品牌介绍:main()函数的特殊用法

来源:百度文库 编辑:神马品牌网 时间:2024/07/08 15:55:43
#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();

这是怎么回事啊