标题:error LNK2001是什么原因?
取消只看楼主
Mycr
Rank: 1
等 级:新手上路
帖 子:203
专家分:0
注 册:2006-9-18
 问题点数:0 回复次数:0 
error LNK2001是什么原因?

#include "iostream"

using std::cin;
using std::cout;
using std::endl;

#include "iomanip"

using std::setw;

#include "cstdlib"

int mian()
{
unsigned seed;
cout<<"Enter seed:";
cin>>seed;
srand(seed);

for(int counter=0;counter<10;counter++)
{
cout<<setw(10)<<(1+rand()%6);
if(counter%5==0)
cout<<endl;
}
return 0;
}



--------------------Configuration: 3_9 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/3_9.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

3_9.exe - 2 error(s), 0 warning(s)

搜索更多相关主题的帖子: counter include return Enter 
2006-11-09 09:03



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-101679-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.071970 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved