/////////////////////////////////////////////////////////// // // cstring.h // // The interface for a linked-list based character // string class. // // Revision history: // 1/3/00 (Jeff Ondich) Created the interface. // /////////////////////////////////////////////////////////// #ifndef CSTRING_H #define CSTRING_H #include struct StringNode { char mData; StringNode *mNext; }; class CString { private: StringNode mHead; public: CString(); CString( const char *str ); CString( const CString& s ); virtual ~CString(); int Length() const; void MakeUpper(); void MakeLower(); void Reverse(); int Find( char c ) const; int Find( const char *str ) const; int Find( const CString& s ) const; char& operator[]( int index ); CString& operator=( const CString& s ); CString& operator=( const char *str ); friend ostream& operator<<( ostream&, const CString& ); friend istream& operator>>( istream&, CString& ); }; ostream& operator<<( ostream&, const CString& ); istream& operator>>( istream&, CString& ); #endif