1 #include<iostream> 2 //#include<string> 3 using namespace std; 4 5 class Strings 6 { 7 public: 8 Strings(const char * str=NULL); 9 10 Strings(const Strings &another); 11 ~Strings(); 12 Strings & operator=(const Strings &ths); 13 private: 14 char *m_data; 15 }; 16 Strings::Strings(const char *str) 17 { 18 if(str==NULL) 19 { 20 m_data=new char[1]; 21 m_data[0]='