vector auto element erase
there is no way to use range-based for loops to erase. You should use the standard way:
for(auto it = allObjects.begin(); it != allObjects.end();)
{
if(/* condition */)
it = allObjects.erase(it);
else
++it;
}
本文链接地址:https://const.net.cn/713.html