vector/list/map/set的插入、删除、遍历 - remove\erase函数
1、vector中删除满足某些条件的元素和迭代器失效问题#include <iostream>#include <vector>using namespace std;int main(){ std::vector<int> mVector; mVector.push_back(1); //插入元素push_back mVector.push_back(2);