On Mon, Feb 04, 2002 at 11:48:23AM +0200, Dekel Tsur wrote: > > should probably just need something like: > > iterator temp = iter->next(); > > iter->erase(); > > iter = temp; > > Maybe. Maybe I need to reread how vector iterators are supposed to > > work? > > This is not valid either.
Indeed. All iterators behind the erased positions are invalidated > A valid code is: > > int i = iter - vec.begin(); > iter->erase(); > iter = vec.begin() + i; Another valid solution should be iter = iter->erase(); if my reading of 23.2.4.3 is correct. Andre' -- André Pönitz .............................................. [EMAIL PROTECTED]