how to delete last character from string in c++ code example
Example 1: remove last character from 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);