auto it = std::find(v.begin(),v.end(),3); // check that there actually is a 3 in our vector if (it != v.end()) { v.erase(it); }