Question : last character of std::string
Answered by : helpful-hippopotamus-ccurjtq6pd2z
// string::back
#include <iostream>
#include <string>
int main ()
{ std::string str ("hello world."); str.back() = '!'; std::cout << str << '\n'; return 0;
}
Source : http://www.cplusplus.com/reference/string/string/back/ | Last Update : Thu, 17 Jun 21