str1.cpp
// str1.cpp -- introducing the string class
#include <iostream>
#include <string>
// using string constructorsint main()
{using namespace std;string one(\"Lottery Winner!\"); // ctor #1cout << one << endl; // overloaded <<string two(20, \'$\'); // ctor #2cout << two << endl;string three(one); // ctor #3cout << three << endl;one += \" Oops!\"; // overloaded +=cout << one << endl;two = \"Sorry! That was \";three[0] = \'P\';string four; // ctor #4four = two + three; // overloaded +, =cout << four << endl;char alls[] = \"All\'s well that ends well\";string five(alls, 20); // ctor #5cout << five << \"!\\n\";string six