09-22-2013, 02:32 AM
Basically you need something like this (skeleton only):
for (itr = Container.begin; itr != Container.end(); ) // Note that you need to call end() each time, and you cannot auto-advance itr
{
if (ShouldDelete)
{
itr = Container.erase(itr); // Container must support erasing
}
else
{
++itr;
}
}

