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-03-05 20:28:51 发布
std::vector<std::string> vecstr;
vecstr.push_back("xxx");
std::string str_val = "xxx";
vecstr.erase(std::remove(vecstr.begin(), vecstr.end(), str_val));