慕慕森
class mystring{public :mystring (int len){m_pData = new char[len+ 1];m_nLen = len;}~mystring(){if(m_pData ) delete [] m_pData ;}int getlen(){ return m_nLen;}mystring operator + (mystring& str1,mystring& str2){mystring temp(str1.getlen() +str2.getlen());strcpy(temp.m_pData, str1.m_pData);strcat(emp.m_pData,str2.m_pData);return temp;}public:char* m_pData;int m_nLen;};