只简单写了几个函数
class String { public: String(const char* pStr = NULL); String(const String& str); virtual ~String(); String &operator =(const String& str); int Length() const; const char* cstr() const; friend std::ostream& operator<<(std::ostream& os, const String& str); private: char* m_pData; };
String::String(const char* pStr) { if (pStr == NULL) { m_pData = new char('