Answers for "c++ back()"

C++
0

c++ back()

// string::back
#include <iostream>
#include <string>

int main ()
{
  std::string str ("hello world.");
  str.back() = '!';
  std::cout << str << '\n';
  return 0;
}
Posted by: Guest on June-10-2021

Browse Popular Code Answers by Language