Let\'s say I have some kind of collection and I obtained an iterator for the beginning of it. Now let\'s say I modified the collection. Can I still use the iterator safely,
No, iterators are only good while the iterated container is unchanged. If a collection is modified, the iterator should be obtained anew.