I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be presen
To erase 1st element you can use:
vector mV{ 1, 2, 3, 4, 5 }; vector::iterator it; it = mV.begin(); mV.erase(it);