第十四周阅读程序3
来源:互联网 发布:网络推广优化 编辑:程序博客网 时间:2024/05/18 10:58
/*Copyright (c) 2016,烟台大学计算机学院*All rights reserved.*文件名称 :*作 者 : 李钊*完成日期 : 2016年6月2号*版 本 号 : 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
- 第十四周阅读程序3
- 第十四周阅读程序3
- 第十四周阅读程序3
- 第十四周(3)-阅读程序
- 第十四周阅读程序
- 第十四周 阅读程序
- 第十四周程序阅读
- 第十四周--阅读程序
- 第十四周阅读程序
- 第十四周阅读程序
- 第十四周阅读程序:1-(3)
- 第十四周阅读程序(3)
- 第十四周项目 阅读程序 3
- 第十四周阅读程序——3
- 第十四周阅读程序——3
- 第十四周 阅读程序1
- 第十四周阅读程序2
- 第十四周阅读程序1
- (selenium 五)unittest通过测试套件组织用例
- 第十四周阅读程序2
- Android面试题二
- 使用bash工具创建ssh key
- 十四周练习
- 第十四周阅读程序3
- 第12 周 项目三
- 两个成员的类模板
- css基础
- [C++基础]队列<queue>中的常用函数
- LeetCode题解——Data Stream as Disjoint Intervals
- 分数类中的运算符重载
- 手动开发动态资源之servlet初步
- Android-Apk插件化研究