使用vc++6.0出现hello.exe - 1 error(s), 0 warning(s)

代码f5后出现--------------------Configuration:hello-Win32Debug--------------------Compilin... 代码

f5后出现
--------------------Configuration: hello - Win32 Debug--------------------
Compiling...
hello.c
c:\program files\microsoft visual studio\hello\hello\hello.c(3) : error C2449: found '{' at file scope (missing function header?)
c:\program files\microsoft visual studio\hello\hello\hello.c(6) : error C2059: syntax error : '}'
执行 cl.exe 时出错.

hello.exe - 1 error(s), 0 warning(s)
是什么意思
展开
 我来答
guojingcha
2013-07-05 · TA获得超过1.1万个赞
知道大有可为答主
回答量:1.3万
采纳率:42%
帮助的人:9841万
展开全部
c语言程序必须有一个主函数。你少写了。完整的应该是这样的:
#include<stdio.h>
void main()
{
printf("hello,word\n");
}
追问
加上之后
Configuration: hello - Win32 Debug
Compiling...
hello.c
Linking...
LINK : fatal error LNK1104: cannot open file "Debug/hello.exe"
执行 link.exe 时出错.

hello.exe - 1 error(s), 0 warning(s)
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
浅se诱惑
2013-07-05 · TA获得超过605个赞
知道小有建树答主
回答量:263
采纳率:0%
帮助的人:205万
展开全部
没有 main函数做入口

应该改为

#include<stdio.h>

int main()
{
printf("hello,word\n");
}
更多追问追答
追问
加上之后
Configuration: hello - Win32 Debug
Compiling...
hello.c
Linking...
LINK : fatal error LNK1104: cannot open file "Debug/hello.exe"
执行 link.exe 时出错.

hello.exe - 1 error(s), 0 warning(s)
追答
你重新建立工程,如果你用VC++6.0的话,你别建立空文档,选择c++file之后,创建第三个helloword工程

或者选择第二个
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式