运算符重载不是你这么玩的,运算符重载是自身与other做运算,函数参数只要一个other就可以了:Matrix Matrix::operator + (const Matrix& other){int r=other.row,c=other.col;Matrix c1(r,c);for(int i=0;i{ c1.p[i]=this->p[i]+other.p[i];}return c1;}