使用vs2010编写任何程序都会出现返回值为 0 (0x0)。 超级菜鸟

#include<stdio.h>main{printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456,'A',"hello");}“hello... #include<stdio.h>
main
{
printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A',"hello");
}

“hello world.exe”: 已加载“C:\Users\ale\Documents\Visual Studio 2010\Projects\hello world\Debug\hello world.exe”,已加载符号。
“hello world.exe”: 已加载“C:\Windows\System32\ntdll.dll”,Cannot find or open the PDB file
“hello world.exe”: 已加载“C:\Windows\System32\kernel32.dll”,Cannot find or open the PDB file
“hello world.exe”: 已加载“C:\Windows\System32\KernelBase.dll”,Cannot find or open the PDB file
“hello world.exe”: 已加载“C:\Windows\System32\msvcr100d.dll”,已加载符号。
程序“[1636] hello world.exe: 本机”已退出,返回值为 0 (0x0)。

我是初学者,希望大家能帮帮我...
展开
 我来答
Raiuy
2012-08-06 · TA获得超过2916个赞
知道大有可为答主
回答量:2210
采纳率:0%
帮助的人:863万
展开全部
返回值是0说明程序没问题
如果你看不见运行的窗口,在printf下面加上一句
system ("pause");
追问
#include
main
{
printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A',"hello");
system ("pause");
}
只是跟原来一样一闪而过的,主要我就是想让窗口停留在那儿
dxf6939259
2012-08-06 · 超过27用户采纳过TA的回答
知道答主
回答量:101
采纳率:0%
帮助的人:39.5万
展开全部
#include <conio.h>
#include<stdio.h>
main
{
printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A',"hello");
getch();
}

这样试一下,OK了!
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
Boy守望
2012-09-08
知道答主
回答量:55
采纳率:0%
帮助的人:22.2万
展开全部
0是程序的返回值,你在main加return 1;他返回值就是1了
main()的返回值就是程序的返回值
那为什么你没有return还是返回值了呢?应为crt做了调整
你加不加return 0;都有xor eax,eax
可以自己看反汇编
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
匿名用户
2019-03-05
展开全部
你加int main()
{
printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A',"hello");
return system("pause");
}
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友e96ae71ed
2012-08-08 · TA获得超过728个赞
知道小有建树答主
回答量:1548
采纳率:0%
帮助的人:713万
展开全部
main前面加int,最后加return 0
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(3)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式