摘要:
int main() { stack test; //插入 test.push(1); test.push(2); test.push(3); //删除 test.pop(); cout << test.size() << endl; while (!test.empty()){//清空栈 test.pop(... 阅读全文
摘要:
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; ... 阅读全文
摘要:
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 << " "; ... 阅读全文
摘要:
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... 阅读全文