vector iterators
Aug 29, 2010 at 2:26am
If I have a vector
and I create an iterator
|
vector<int>::iterator in_it;
|
and set
1 2
|
in_it = incoming.begin();
|
and then erase the first member of the vector
|
incoming.erase(incoming.begin());
|
will the iterator now be automatically adjusted to the next member of the vector?
Aug 29, 2010 at 2:34am
no. Your iterator would become invalid.
Aug 29, 2010 at 4:34am
Topic archived. No new replies allowed.