Here is my code
/*
Implementation of matrix inverse solving
Realize the determinant of a matrix computation
Implement AK=b solving operation
1 o matrix rank of
*/
#include
#include
#include
#include
using namespace std;
Class Matrix {//two-dimensional Matrix class
Private:
A double * *;
Int row;
Int col;
Void initMatrix ();//assign matrix space
Public:
M Matrix (int, int n);//the constructor
M Matrix (int, int n, double * a);//the constructor
~ Matrix ();//destructors
Matrix & amp; Operator=(const Matrix & amp;);
Void the show ();//output matrix
};
//allocate space
Void Matrix: : initMatrix () {
A=new double * (row),
for(int i=0; i
}
}
//the constructor
Matrix: : Matrix (int m, int n) {
The row=m;
Col=n;
InitMatrix ();
for(int i=0; i
}
}
//the constructor
Matrix: : Matrix (int m, int n, double * a) {
The row=m;
Col=n;
InitMatrix ();
for(int i=0; i
}
}
Void Matrix: : show () {
Cout<& lt;" \ n matrix for: \ n ";
for(int i=0; i
}
}
//destructors
Matrix: : ~ Matrix () {
for(int i=0; i
}
The delete [] A;
}
//implementation matrix copy
Matrix & amp; Matrix: : operator=(const Matrix & amp; M) {
If (this==& amp; M) {
Return * this;
}
If (row!=m.r ow | | col! M.c ol)={
for(int i=0; i
}
The delete [] A;
The row=m.r ow.
Col=m.c ol;
InitMatrix ();
}
for (int i=0; i
}
}
Return * this;
}