/////// Refstr.h /////// #include #include #define OP operator class Refstr { public: Refstr(char *str/* = ""*/); // constructor Refstr(const Refstr& s); // copy constructor Refstr& OP = (const Refstr& s); // assignment int cmp(const Refstr& s) const; unsigned show_cnt() { return(ptr->cnt); } void display(); ~Refstr(); private: // nested class class Cell { public: Cell( char *s ); char *str; unsigned cnt; ~Cell() { cout << "~Cell" << endl; delete [] str; } }; Cell *ptr; };