How would i delete an item from a list<> class while im iterating through the list? I need it to first delete the item, than go to the next item without any problems.
for(list<ThrowObject>::iterator it = throwObjects.begin(); it != throwObjects.end(); ++it)
ThrowObject& throwObject = *it;
if(****) //delete the item