|
1鱼币
#include <stdio.h>
void main{
printf("HelloWorld");
}
就这么简单的一个代码,按照甲鱼老师的教程,在VS6.0里打出来,编译的时候报错:
--------------------Configuration: HelloWorld - Win32 Debug--------------------
Compiling...
HelloWorld.c
D:\CPRO\HelloWorld\HelloWorld.c(3) : error C2182: 'main' : illegal use of type 'void'
D:\CPRO\HelloWorld\HelloWorld.c(3) : error C2054: expected '(' to follow 'main'
执行 cl.exe 时出错.
HelloWorld.obj - 1 error(s), 0 warning(s)
实在是搞不懂,有明白的好好讲解一下。
|
最佳答案
查看完整内容
呵呵 应该是
#include
void main()
{
printf("Hello world! ");
}
|