需要删除最后3个字符:

```c++ std::string projectName; foreach (std::string s, sampleNameVector) { projectName += s + " + "; } projectName.erase(projectName.end() - 3, projectName.end());

标签: C++

添加新评论