How can I remove last character from a C++ string? I tried st = substr(st.length()-1); But it didn’t work. 11 Answers 11 Tags: cstringsubstring