String::String(const String &other){ // 得分点:输入参数为const型
int length = strlen(other.m_data);
m_data = new char[length+1]; //加分点:对m_data加NULL 判断
strcpy(m_data, other.m_data);
}
转载于:https://www.cnblogs.com/quan1/p/6696193.html
String::String(const String &other){ // 得分点:输入参数为const型
int length = strlen(other.m_data);
m_data = new char[length+1]; //加分点:对m_data加NULL 判断
strcpy(m_data, other.m_data);
}
转载于:https://www.cnblogs.com/quan1/p/6696193.html