Hi all!
What is wrong with this loop that have to increment each element in the vector?
vector<int>::iterator iter;
for (iter=scores.begin(); iter!=scores.end();++iter)
{
iter++
}
I think what is wrong is that it doesn't have the derefenrence operator (*) in front of iter++, so it doesn't increment the value of each element in the vector.
I want to make sure that i am correct.
Thank you in advance!
Yes, the idea was trying to modify the vector by adding one to each value stored in it.
So, it is right the (*iter)++
I didn't know about the parenthesis.