You are viewing a single comment's thread. Return to all comments →
Indeed the solution works but the problem here is the author who made this exercise.
If you do vector.erase(vector.begin()+2) this removes the third element of the vector not the second element.
Seems like cookies are disabled on this browser, please enable them to open this website
Vector-Erase
You are viewing a single comment's thread. Return to all comments →
Indeed the solution works but the problem here is the author who made this exercise.
If you do vector.erase(vector.begin()+2) this removes the third element of the vector not the second element.