c++ remove last char from string code example
Example 1: delete last char of string C++
st = myString.substr(0, myString.size()-1);
Example 2: remove last letter in string c++
#include <iostream>
#include <string>
str.resize(str.size() - 1);
st = myString.substr(0, myString.size()-1);
#include <iostream>
#include <string>
str.resize(str.size() - 1);