摘要: int main() { stack test; //插入 test.push(1); test.push(2); test.push(3); //删除 test.pop(); cout << test.size() << endl; while (!test.empty()){//清空栈 test.pop(... 阅读全文
posted @ 2018-08-24 15:55 aote369 阅读(131) 评论(0) 推荐(0) 编辑
摘要: int main() { set test; //插入 test.insert(2); test.insert(1); test.insert(4); test.insert(5); test.insert(3); //遍历 for (auto i : test) cout << i << endl; ... 阅读全文
posted @ 2018-08-24 15:31 aote369 阅读(4449) 评论(1) 推荐(0) 编辑
摘要: int main() { vector test; //插入 test.push_back(0); test.insert(test.begin(),1);//在迭代器之前插入 test.insert(test.end(), 3, 2); //遍历 for (auto i : test) cout << i << " "; ... 阅读全文
posted @ 2018-08-24 10:59 aote369 阅读(1156) 评论(0) 推荐(0) 编辑
摘要: int main() { list test; //插入 test.push_back(1); test.push_back(1); test.push_front(0); test.push_back(2); auto it = test.begin(); for (int count = 0; it != test.e... 阅读全文
posted @ 2018-08-24 10:03 aote369 阅读(1822) 评论(0) 推荐(0) 编辑