class with pointer menbers
string_test.cpp
1 #include "string.h" 2 #include <iostream> 3 4 using namespace std; 5 6 int main() 7 { 8 String s1("hello"); 9 String s2("world"); 10 11 String s3(s2); 12 cout << s3 << endl; 13 14 s3 = s1; 15 cout << s3 << endl; 16 cout << s2 << endl; 17 cout << s1 << endl; 18 }