使用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)。
我是初学者,希望大家能帮帮我... 展开
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)。
我是初学者,希望大家能帮帮我... 展开
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了!
#include<stdio.h>
main
{
printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A',"hello");
getch();
}
这样试一下,OK了!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
0是程序的返回值,你在main加return 1;他返回值就是1了
main()的返回值就是程序的返回值
那为什么你没有return还是返回值了呢?应为crt做了调整
你加不加return 0;都有xor eax,eax
可以自己看反汇编
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");
}
{
printf("a=%4d;b=%-6.2f,c=%c,d=%s",12,3.456 ,'A',"hello");
return system("pause");
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
main前面加int,最后加return 0
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询