读书人

新手有关问题link出错

发布时间: 2012-02-07 17:45:36 作者: rapoo

新手问题link出错
#include <iostream.h>
struct Point
{
int x;
int y;
};

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

LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Lesson2.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
Lesson2.exe - 1 error(s), 0 warning(s)

----------
怎么link出错呢

[解决办法]
工程建错了,应该建console工程。

读书人网 >C++

热点推荐