文章分类 -  C++避坑指南

C++多年工程实践中总结的容易犯的错
摘要:问题场景: 以vector为例,有时候我们会把原始数据列表作为vector数组,同时把需要排序或其他处理的数组使用指向原始vector的迭代器数组 示例代码: 1 #include <iostream> 2 #include <vector> 3 #include <algorithm> 4 usi 阅读全文
posted @ 2022-06-26 21:13 飞天赤狐 阅读(35) 评论(0) 推荐(0) 编辑
摘要:错误写法 循环内直接erase #include <iostream> #include <vector> #include <string> using namespace std; int main(int argc, char* argv[]) { vector<string> nameLis 阅读全文
posted @ 2022-06-24 08:00 飞天赤狐 阅读(61) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示