VC++编译的时候出毛病了~~~

来源:百度知道 编辑:UC知道 时间:2024/06/23 08:08:55
工程是 Win32 Console Application 名称是123

源码是

#include<iostream.h>
oid mian()
{
cout<<"Hello!";
}

编译的时候说

--------------------Configuration: 123 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/123.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

123.exe - 1 error(s), 0 warning(s)

请问那里出错了?
工程改为Win32 Application
错误提示为

--------------------Configuration: 234 - Win32 Debug--------------------
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/123.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

123.exe - 1 error(s), 0 warning(s)

oid mian()

打错了
应该是
void main()

呵呵,我也是啊,,犯了这个错误,连
m ain
m ian
都没有分清

你的程序错的很严重:
#include<iostream>
using namespace std;
void main()
{
cout<<"hello!";
}
这样就可以了!