{
delete [] m_data;
m_data=0; //add by xie
// 由于m_data是内部数据类型,也可以写成 delete m_data;
//note by xie:有次去华为,华为批题,写成delete m_data;不给分,一个人的见识就是这样得来的,:p
}
// string的普通构造函数
string::string(const char *str) // 6分
{
if(str==null)
{
m_data = new char[1]; // 若能加 null 判断则更好