1// string::operator+=
2#include <iostream>
3#include <string>
4
5int main ()
6{
7 std::string name ("John");
8 std::string family ("Smith");
9 name += " K. "; // c-string
10 name += family; // string
11 name += '\n'; // character
12
13 std::cout << name;
14 return 0;
15}