使用vs2010编写任何程序都会出现返回值为 0 (0x0)。 超级菜鸟
使用vs2010编写任何程序都会出现返回值为 0 (0x0)。 超级菜鸟
#include
#include
main
{
printf("瞎敬a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A',"hello");
getch();
}
这磨缓慎样试一哪迹下,OK了!
你加int main()
{
printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A'嫌李,"哪者行hello");
return system("pause"李哗);
}
0是程序的返回值,你在main加return 1;他返回值就是1了
main()的返回值就是程序的返此卖回值
那为什么你没有return还是返回值了呢?应为crt做森埋逗了调整
你加不加return 0;都液困有xor eax,eax
可以自己看反汇编
main前面加int,最后加return 0
相关内容