标签:ras color with 相等 iter move style cto col
vector中移除“与某值相等”的第一个元素。
std::vector<Elem> coll; ... //remove first element with value val std::vector<Elem>::iterator pos; pos = find(coll.begin(),coll.end(),val); if(pos != coll.end()) { coll.erase(pos); }
标签:ras color with 相等 iter move style cto col
原文地址:https://www.cnblogs.com/herd/p/11439960.html