visual c++6.0 操作问题

来源:百度知道 编辑:UC知道 时间:2024/09/28 12:20:47
我在VC里建了一个源程序,写了一个简单的程序
#include <stdio.h>
main()
{printf("hello");
}
可是编译链接后,输出栏里提示有一个错误。总是生成不了可执行文件!可是源程序也没错误啊,究竟是我写错了还是软件有问题。希望各位朋友教教我!!!

#include <stdio.h>
int main()
{printf("hello");
return 0;
}
你编写的代码其实也是正确的,如果像上面这样补充一下,
你的编译器还是无法正常编译,说明你编译器有问题

源程序没错

我也相信VC

你可以重启一下VC
要不你是不是操作错了

要新建C++sourcefile
是不是新建错了?

main函数前面要加void或者int
#include <stdio.h>
void main()
{printf("hello");
}
或者
#include <stdio.h>
int void main()
{printf("hello");
return 0;
}

主函数没有返回值,在main前面加个void.试下.

是什么错误?请写出提示信息.