📅  最后修改于: 2022-03-11 14:44:49.940000             🧑  作者: Mango
carVec.erase(std::remove_if(carVec.begin(), carVec.end(), [&id_to_delete](const Car& ele)->bool
{
return ele.getnewId() == id_to_delete;
}), carVec.end());