在练习C++ 为什么随便写个程序就说构建失败啊
codeblocks吧
全部回复
仅看楼主
level 1
RT
||=== 构建文件: "无目标" in "无项目" (compiler: 未知的) ===|
D:\software\C\11\faith.cpp|2|error: '::main' must return 'int'|
||=== Build 失败: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
说这个
2016年10月12日 08点10分 1
level 1
有木有人
2016年10月12日 08点10分 2
level 2
是否保存,或代码粘贴出来,让大家看看
2016年10月13日 08点10分 3
和代码没关系应该是程序问题 就普通的你好世界的代码 不管什么代码 应该是没有编译库
2016年10月13日 09点10分
level 2
#include <stdio.h>
int main()
{
/* 我的第一个 C 程序 */
printf("Hello, World! \n");
return 0;
}
用这个代码试试
2016年10月14日 12点10分 4
level 2
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World";
return 0;
}
或者试试这个
error: '::main' must return 'int'你的错误中有这个,你main前用的啥?
2016年10月14日 12点10分 5
level 2
还是建议有代码和整体截图,要不说不清
2016年10月14日 12点10分 6
level 1
打开 项目名称.c
bp
文件,不要打开 main.c 文件
2018年07月27日 00点07分 7
level 1
ding
2018年11月27日 04点11分 8
1