WinMain与Main

#include <iostream.h>
struct Point
{
int x;
int y;
};

void main()
{
Point pt;
pt.x=0;
pt.y=1;
cout<<pt.x<<endl<<pt.y<<endl;
}

 

 

上面代码在创建工程时候如果选择Win32 Control Application则可以编译通过

而选择Win32 Application的话则不能编译通过会报如下错误:

unresolved external symbol _WinMain@16

fatal error LNK1120: 1 unresolved externals

你可能感兴趣的:(application,include)