what vector erase do code example
Example 1: vector erase specific element
vector.erase( vector.begin() + 3 ); // Deleting the fourth element
Example 2: vector remove class
carVec.erase(std::remove_if(carVec.begin(), carVec.end(), [&id_to_delete](const Car& ele)->bool
{
return ele.getnewId() == id_to_delete;
}), carVec.end());