加文

希望是美好的……
随笔 - 0, 文章 - 209, 评论 - 0, 引用 - 0

导航

<2025年7月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

常用链接

留言簿

文章分类

文章档案

相册

搜索

  •  

最新评论

list begin

#include <iostream>
#include <list>
#include <algorithm>
#include <iterator>
#include <numeric>
using namespace std;

int main ()
{
    list<int> l(5);
    iota(l.begin(),l.end(),500);

    list<int>::iterator It = l.begin();
    while ( It != l.end() )
        cout << *It++ << " ";
    cout << endl;
    getchar();
    return 0;
}

posted on 2012-04-12 10:49 加文 阅读(77) 评论(0)  编辑 收藏 引用 所属分类: C++