// File: mystring.h // ================ // Interface file for user-defined String class. // In this case, the characters of a String are held internally // in an array of fixed size. #ifndef _MYSTRING_H #define _MYSTRING_H #define MAX_STR_LENGTH 200 class String { public: String(); void assign(const char s[]); void append(const String &str); int compare_to(const String &str) const; void print() const; int length() const; char element(int i) const; private: char contents[MAX_STR_LENGTH+1]; int len; }; #endif /* not defined _MYSTRING_H */