Re: [gtkmm] Gtkmm iterators



erase() invalidates iterators pointing to elements after the point of deletion.

Never access an element through an invalid iterator; the effect is undefined and quite likely disastrous.

So it's like a std::vector in this respect?

After I call erase(Iter), is Iter still valid (unless it's equal to
end())?


Thanks,
Roger

----------------------------------------------------------

I guess so - but if you are looking at removing elements from the center of your data structure, then a list may be more appropriate.

_________________________________________________________________
Hot chart ringtones and polyphonics. Go to http://ninemsn.com.au/mobilemania/default.asp




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]