pop off end of string c++ code example
Example: pop off end of string c++
#include
int main() {
std::string str = "Hello, World!";
str.pop_back(); // str is now "Hello, World"
}
#include
int main() {
std::string str = "Hello, World!";
str.pop_back(); // str is now "Hello, World"
}