Monday, 14 May 2018

c++ - Can iterators become invalid after operations?







Imagine that I have a map. Somehow I retrieved an iterator pointing to an entry pair<35,37> in the map. I save this iterator as map::iterator _my_iterator3537.




After that, I did a lot of insertion to the map. Is _my_iterator3537 still pointing to the pair<35,37>?

No comments:

Post a Comment

casting - Why wasn&#39;t Tobey Maguire in The Amazing Spider-Man? - Movies &amp; TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...