
Array& operator = Array(Array const& that){
//避免自赋值
if(&that != this){
//释放旧资源
if(m_array)
{
delete[] m_array;
m_array = NULL;
}
//分配新资源
m_array = new int[that.m_size];
//拷贝新内容
memcpy(m_array, that.m_array, that.m_size * sizeof(that.m_array[]));
m_size = that.m_size;
}
//返回自引用
return *this;
}