std::string str = "abcdefg,"; std::cout << "last character:"<<str.back() << std::endl; //输出最后一个字符 str.pop_back(); //删除最后一个字符
2024-02-22 08:17:04
std::string str = "abcdefg,"; std::cout << "last character:"<<str.back() << std::endl; //输出最后一个字符 str.pop_back(); //删除最后一个字符