C/C++ Arena

Step 3 of 6

std::string is easy

std::string does what C strings made painful:

std::string a = "de_";
std::string b = a + "dust2";      // concatenation with +
b.size();                          // length (7)
b == "de_dust2";                   // real comparison with ==
b[0];                              // 'd'
b += "!";                          // append

Your turn: read a first name and a last name, then print Hello, First Last! (N letters) where N is the number of letters in both names (not counting the space).

Previous: Reading with cin Next: bool, auto and range-for