I have a vector that holds items that are either active or inactive. I want the size of this vector to stay small for performance issues, so I want items that have been mark
erase returns a pointer to the next iterator value (same as Vassilis):
erase
vector ::iterator mit for(mit = myVec.begin(); mit != myVec.end(); ) { if(condition) mit = myVec.erase(mit); else mit++; }