#include "Matrix.h" #include "general.h" #include #include #include #include #include #include using namespace std; //------------------------------ Implementation ----------------------------- Matrix::Matrix() //default constructor { rows=columns=0; buf=NULL; cout<<"call constructor"<buf)//个人认为该行程序根本没用 // delete[] this->buf; this->rows=m; this->columns=n; this->buf=new double[m*n]; cout<<"call constructor"<buf)delete[] this->buf; this->rows=A.rows; this->columns=A.columns; this->buf=new double[(A.rows)*(A.columns)]; int i; for(i=0;i<((A.rows)*(A.columns));i++) { this->buf[i]=A.buf[i]; } cout<<"call copy constructor"<buf; this->rows=0; this->columns=0; cout<<"call destructor"<buf||!A.buf) { cout<<"Two Empty Matrix"<columns!=A.columns||this->rows!=A.rows) return false; else { for(i=0;ibuf[i]-A.buf[i])>1e-10) return false; } } return true; } bool Matrix::operator != (const Matrix& A)//overloading != { return !(*this==A); //use == } Matrix& Matrix::operator += (const Matrix& A) //overloading += { if(!A.buf) return *this; if ( (th...