How can I remove last character from a C++ string?
I tried st = substr(st.length()-1); But it didn\'t work.
st = substr(st.length()-1);
str.erase( str.end()-1 )
Reference: std::string::erase() prototype 2
no c++11 or c++0x needed.