//stringf.h //header file for class String with '+' and '==' operators as friends #ifndef STRINGF_H #define STRINGF_H #include class String { friend ostream& operator<<(ostream&, String&); friend istream& operator>>(istream&, String&); friend String operator+(const String&, const String&); friend int operator==(const String&, const String&); public: String(); String(const char *); String(const String&); ~String(); String& operator=(const String&); char& operator[](int); private: char *val; int length; }; #endif