摘要: 1.set集合模型操练#include #include #include#include#includeusing namespace std;//1 集合 元素唯一 自动排序(默认情况下 是从小到大) 不能按照[]方式插入元素 // 红黑树 //set元素的添加/遍历/删除基本操作void s... 阅读全文
posted @ 2015-11-08 20:59 剑风云 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1.priority_queue#include #include using namespace std;void priority_queue_init(){ priority_queue p1 ; //默认情况下 是 最大值优先级队列 priority_queue, less >... 阅读全文
posted @ 2015-11-08 20:48 剑风云 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1.list#include #include using namespace std;//list的基本操作void list_init(){ list l; cout ::iterator it = l.begin(); while (it != l.end()) { ... 阅读全文
posted @ 2015-11-08 20:40 剑风云 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 1.queue#include #include using namespace std;//队列中基本数据类型void queue_push_pop_front(){ queue q; q.push(1); q.push(2); q.push(3); cout q... 阅读全文
posted @ 2015-11-08 20:35 剑风云 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1.stack#include #include using namespace std;//栈模型 //栈的算法 和 数据类型的分离void stack_push(){ stack s; //入栈 for (int i=0; i s; s.push(t1); s.pu... 阅读全文
posted @ 2015-11-08 20:31 剑风云 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1.deque#include #include #include using namespace std;void printD(deque &d){ for (deque::iterator it=d.begin(); it!=d.end(); it++ ) { cou... 阅读全文
posted @ 2015-11-08 20:13 剑风云 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1.vector操作#include #include using namespace std;//数组元素的 添加和删除void vector_push_back_front(){ vector v1; cout 0) { cout v1; v1.push... 阅读全文
posted @ 2015-11-08 19:57 剑风云 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1.Vector 中符合数据类型,指针的存储,出现次数的统计#include#include#includeconst int SIZE=40;using namespace std;typedef struct Teacher{ int age; int name[SIZE];}Tea... 阅读全文
posted @ 2015-11-08 15:36 剑风云 阅读(104) 评论(0) 推荐(0) 编辑