I have simple question. I have a vector:
vector<int> SomeVector;
which has some elements inside, say:
{-1, -1, -1, -1, 3, 8, 255}
Is there a way to remove all elements with value -1 from this vector using pop_back? Or if there is any other way that would also be welcomed BUT:
- I may not know the index of the elements with value -1
- I may not know how many -1's there are in the vector
Just a new student here, any help would be great, thanks in advance...