#ifndef __STRING_HPP__ #define __STRING_HPP__ #include const int STRING_SIZE = 1000; class String { private: char str[STRING_SIZE]; // '\0' public: String(); String(char c); String(const char[]); int capacity() { return STRING_SIZE - 1; } int length() const; String substr(int start, int end) const; int findchar(int start, char c); char operator[](int index) const; // accessor, getter; std::cout<(const String& str2) const; bool operator>=(const String& str2) const; friend std::ostream& operator<<(std::ostream& out, String& s); friend std::istream& operator>>(std::istream& in, String& s); }; std::ostream& operator<<(std::ostream& out, String& s); std::istream& operator>>(std::istream& in, String& s); // String operator+(const String&str1, const String& str2) const; //String operator+(char c, const String& str2) const; //String operator+(const char []c, const String& str2) const; // String(c) + str2; //c + str2; #endif // !__STRING_HPP__