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;
}this

相關文章
相關標籤/搜索