随笔分类 - STL容器
摘要:
阅读全文
摘要:可以用 if ( a.find(x) == a.end() ) 判断 x 在 a 中是否存在
阅读全文
摘要:
阅读全文
摘要:在出栈时需要进行两步操作,即先 top( ) 获得栈顶元素,再 pop( ) 删除栈顶元素
阅读全文
摘要:
阅读全文
摘要:点击查看代码 #include<iostream> #include<vector> using namespace std; int main() { // 初始化 a 为 1, 2, 3 vector<int> a({1, 2, 3}); // 也可以是 vector<int> a {1, 2,
阅读全文