1#include <vector>2#include <iostream>3usingnamespacestd;45intmain()6{7vector<int>test_vec;8for(inti =0; i<100;i++)9{10test_vec.push_back(i);11}12for(vector<int>::iterator it = test_vec.begin(); it !=test_vec.end(); )13{14cout<<*(it)<<endl;15it =test_vec.erase(it...
vector list map 遍历删除指定元素 #include <stdio.h>#include<stdint.h>#include<vector>#include<list>#includetemplate<typename T>voidDump(constT &s) {for(T::const_iterator it = s.begin(); it != s.end(); ++it) { printf("%d", *it); } printf("\n"); }voidDelVector() { std::...