STL 容器
来源:互联网 发布:房地产网络端口是什么 编辑:程序博客网 时间:2024/06/04 19:06
#include <iostream>using namespace std;#include <list> int main(){list<int> l1;int a[5] = {3,5,6,7,9};list<int> l2(a, a+5);cout << "l1.size():" << l1.size() << endl;cout << "l2.size():" << l2.size() << endl;list<int>::iterator it;for (it=l2.begin(); it!=l2.end(); it++)cout << *it << ' ';cout << endl; it = l2.begin();it++;l2.erase(it); l2.insert(l2.begin(),100);l2.insert(l2.end(),200);for (it=l2.begin(); it!=l2.end(); it++)cout << *it << ' ';cout << endl; return 0;}
阅读全文
0 0
- STL 容器
- STL容器
- STL容器
- STL容器
- STL容器
- STL:容器
- STL容器
- STL容器
- STL-容器
- STL容器
- STL容器
- STL 容器
- stl 容器
- STL容器
- STL容器
- STL 容器
- STL容器
- STL容器
- 数据结构实验之栈二:一般算术表达式转换成后缀式
- 查看电脑的ip地址
- kotlin的一些学习和使用时遇到的问题
- Java设计模式之六大原则
- MySQL--操作简记(联结表,组合查询(UNION))
- STL 容器
- C#1的核心基础之值类型和引用类型
- 改进型归一化混音算法
- ionic2中ion-segment用法
- Hibernate中主键增长的方式? assigned sequence identity increment 都代表什么意思
- Android 创建数据库 SQliteDatabase
- (拓扑排序)确定比赛名次--HDOJ
- java.lang.IllegalStateException
- 怎么清理苹果电脑垃圾 CleanMymac 4 免激活 破解版下载