64,584
社区成员
发帖
与我相关
我的任务
分享
vector<int> vecInt;
int a = 2;
int b = 1;
vecInt.push_back(a);
vector<int>::iterator iter;
for(iter = vecInt.begin(); iter != vecInt.end(); iter++){
if((*iter) == 2){
vecInt.push_back(b);
}
cout << *iter << endl;
}