// str.h - header file for str class #include class str { private: char *array; int len, max; public: str(int n = 10); // void and size ctor str(const str &s); // copy ctor str(const char *s); // promotion ctor ~str(); // dtor str& operator=(const str &s); // assignment operator char& operator[](int n); // index operator char operator[](int n) const; // index operator for const str void operator+=(char ch); // append char void operator+=(const str &s); // append str s int size() const; // return number of chars }; std::ostream& operator<<(std::ostream& out, const str &s);