for (vector<type>::iterator it = sample.begin(); it != sample.end();)
{
if (*it == fixed)
{
it = sammple.erase(it);
}
else
{
++it;
}
}
vector删除指定元素
最新推荐文章于 2024-01-21 15:46:24 发布
for (vector<type>::iterator it = sample.begin(); it != sample.end();)
{
if (*it == fixed)
{
it = sammple.erase(it);
}
else
{
++it;
}
}