随笔分类 -  STL容器

摘要:![image](https://img2022.cnblogs.com/blog/2674359/202204/2674359-20220422225030033-1871223327.png) 阅读全文
posted @ 2022-04-22 22:51 wKingYu 阅读(21) 评论(0) 推荐(1) 编辑
摘要:可以用 if ( a.find(x) == a.end() ) 判断 x 在 a 中是否存在 阅读全文
posted @ 2022-04-22 22:19 wKingYu 阅读(12) 评论(0) 推荐(0) 编辑
摘要:![image](https://img2022.cnblogs.com/blog/2674359/202204/2674359-20220422220601594-1540187429.png) 阅读全文
posted @ 2022-04-22 22:06 wKingYu 阅读(13) 评论(0) 推荐(1) 编辑
摘要:在出栈时需要进行两步操作,即先 top( ) 获得栈顶元素,再 pop( ) 删除栈顶元素 阅读全文
posted @ 2022-04-22 21:49 wKingYu 阅读(17) 评论(0) 推荐(0) 编辑
摘要:![image](https://img2022.cnblogs.com/blog/2674359/202204/2674359-20220422213958989-1883945665.png) 阅读全文
posted @ 2022-04-22 21:41 wKingYu 阅读(20) 评论(0) 推荐(0) 编辑
摘要:点击查看代码 #include<iostream> #include<vector> using namespace std; int main() { // 初始化 a 为 1, 2, 3 vector<int> a({1, 2, 3}); // 也可以是 vector<int> a {1, 2, 阅读全文
posted @ 2022-04-22 19:26 wKingYu 阅读(24) 评论(0) 推荐(0) 编辑

欢迎阅读『STL容器』
点击右上角即可分享
微信分享提示