c++ 删除末尾字符
需要删除最后3个字符:
```c++ std::string projectName; foreach (std::string s, sampleNameVector) { projectName += s + " + "; } projectName.erase(projectName.end() - 3, projectName.end());
需要删除最后3个字符:
```c++ std::string projectName; foreach (std::string s, sampleNameVector) { projectName += s + " + "; } projectName.erase(projectName.end() - 3, projectName.end());