unresolved external symbol _WinMain@16 错误~~如何解决
#include<iostream.h>
class A
{
int x;
public:
A(int x1)
{
x=x1;
}
void disp()
{
cout<<"x="<<x<<endl;
}
};
void main()
{
A a(1);
A b(2);
cout<<"a:";
a.disp();
cout<<"b:";
b.disp();
}
编译通过。连接时出错。
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/walkman2.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
------------------
请多多指教。