Strint类成员

String& String::operator=(const string& other)
{
 if(this == &other)
 {
  return *this;
 }
 delete m_data;
 m_data = new char[strlen(other.m_data)+1];
 strcpy(m_data,other.m_data);
 return *this;
}

原文地址:https://www.cnblogs.com/jiese/p/3204024.html