class BString { friend BString operator+ (const BString& x, const BString& y); friend bool operator< (const BString& x, const BString& y); friend bool operator> (const BString& x, const BString& y); friend bool operator<=(const BString& x, const BString& y); friend bool operator>=(const BString& x, const BString& y); friend bool operator== (const BString& x, const BString& y); friend bool operator!= (const BString& x, const BString& y); public: BString(); // default constructor -- init to empty string BString(const char * s); // conversion constructor FROM a c-string BString(int x); // consversion from int to BString ~BString(); // destructor for final cleanup // we need our DEEP COPY functions! BString(const BString& s); // copy constructor BString& operator=(const BString& s); // assignment operator int GetLength() const; // return the length (size) private: char* str; // pointer to our dynamic array of characters int size; // the size of our string (number of chars) // we will ALLOCATE only to the size needed };