Listing 6 Tests string class with deep copy

// tstr2.cpp
#include <iostream.h>
#include "str2.h"

main()
{
   string s("hello"), t = s;

   t[0] = 'j';
   cout << "s == " << s << end1;
   cout << "t == " << t << endl:
   return 0;
}

/* Output:
s == hello
t == jello
*/

// End of File