简单容器和迭代器
来源:互联网 发布:域名出售网 编辑:程序博客网 时间:2024/05/29 11:35
- /*
*copvriqht(c)2016,烟台大学计算机学院
*All rights reserved.
*文件名称:test.cpp
*作者:陈传祯
*完成日期:2016年6月22日
*版本号:v1.0
*
*问题描述
*输入描述
*程序输出
*/#include <iterator> - #include <list>
- #include <algorithm>
- #include <iostream>
- using namespace std;
- int main()
- {
- int ia[5] = {1,2,3,4};
- list<int> id(ia, ia+4);
- ostream_iterator<int> outite(cout, " ");
- copy(id.begin(), id.end(), outite);
- cout << endl;
- copy(ia+1, ia+2, front_inserter(id));
- copy(id.begin(), id.end(), outite);
- cout << endl;
- copy(ia+3, ia+4, back_inserter(id));
- copy(id.begin(), id.end(), outite);
- cout << endl;
- list<int>::iterator ite = find(id.begin(), id.end(), 3);
- copy(ia+0, ia+2, inserter(id, ite));
- copy(id.begin(), id.end(), outite);
- cout << endl;
- copy(id.rbegin(), id.rend(), outite);
- cout << endl;
- return 0;
- }
0 0
- 简单容器和迭代器
- STL中的简单容器和迭代器
- 顺序容器和简单算法
- 飛飛(七十二)阅读 STL中的简单容器和迭代器
- 飛飛(七十三)阅读 STL中的简单容器和迭代器
- 飛飛(七十四)阅读 STL中的简单容器和迭代器
- 容器和泛型的简单介绍
- Linux 容器的建立和简单管理
- Linux 容器的建立和简单管理
- Linux 容器的建立和简单管理
- Linux 容器的建立和简单管理
- C++容器 和迭代器
- C++容器 和迭代器
- 容器和迭代器
- 理解容器和迭代器
- 容器和迭代器
- 2015级C++第14周程序阅读 STL中的简单容器和迭代器
- STL 容器和迭代器基础
- Leetcode 133 Clone Graph
- Centos7 下安装mplayer播放器
- 08.Java 集合 - HashSet
- error LNK2019: 无法解析的外部符号 _CrtDbgReportW
- mysql高级:表分区
- 简单容器和迭代器
- 【方便快捷的java类库】Apache Commons IO
- oracle: 表连接方式---hash join原理
- numpy.ndarray 交换多维数组(矩阵)的行/列
- Mybatis框架学习(二)—DAO开发方式和Mapper代理的开发方式
- python django
- 浅谈java中的常量池
- mysql高级:触发器
- 解读程序