首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

帮忙看看这段代码到底哪里出有关问题了

2013-08-01 
帮忙看看这段代码到底哪里出问题了#include list#include iostreamusing namespace stdvoidmain(){li

帮忙看看这段代码到底哪里出问题了


#include <list>
#include <iostream>
using namespace std;
void  main()
{
list<int> lint(10,1);
list<int>::iterator iter=--lint.end();
for(iter;iter!=lint.begin();--iter)
cout<<*iter<<endl;
}

给出的错误时这样的:list_reverse.obj : error LNK2005: _main already defined in 9_9.obj
Debug/9_9.exe : fatal error LNK1169: one or more multiply defined symbols found Iterator iostream c++容器 list
[解决办法]
你定义了两个main函数。

热点排行