如题
det::det(const mat& a)
{
this->n=a.i;
cout<<"a.i"<<a.i<<"this->n"<<this->n<<endl;
for(int i=0;i<this->n;i++)
{
for(int j=0;i<this->n;j++)
{
*(this->detMat+this->n*i+j)=*(a.martix+this->n*i+j);
}
}
this->getValue();
}
主要是这里的n没有成功赋值,程序结果显示了a.i,this->n为3
但是出了构造函数后再次访问成员时仍然是类定义中的默认值0;