std::vector<std::string> vecstr;
vecstr.push_back("xxx");
std::string str_val = "xxx";
vecstr.erase(std::remove(vecstr.begin(), vecstr.end(), str_val));
关于从std::vector中删除std::string的方法
最新推荐文章于 2024-06-16 21:07:21 发布
std::vector<std::string> vecstr;
vecstr.push_back("xxx");
std::string str_val = "xxx";
vecstr.erase(std::remove(vecstr.begin(), vecstr.end(), str_val));