Say, I have an iterator
vector<int> myVector;
vector<int>::iterator myIt;
for (myIt=myVector.begin(); myIt!=myVector.end(); ++myIt)
{
}
what if I use myIt++ instead of ++myIt.
I got this question, when I read How do I iterate over a Constant Vector? it says "Please read about prefix versus postfix increment operator. it++ should be ++it, and it++ is needed in rare cases (i.e. when erasing while iterating)." So, I am kind of confused
Thanks.