Matrix Addition and Transpose

Modify your class CMatrix and add the following member functions:
  1. Add(CMatrix B): verify whether the numbers of rows and columns of B are the same as the current matrix. If not, return a matrix with m_Row = m_Column = 0. Otherwise, add corresponding entries of matrix B with this matrix, save them in a temporary matrix, and return it.
  2. Subtract(CMatrix B): implementation the matrix subtraction which is similar to matrix addition as described above.
  3. Transpose(): return the transpose matrix.
    Note: Matrix B is the transpose of matrix A, if for all i, j, B[j][i] == A[i][j].

Test your class definition with this main program. Save your class definition in "matrix.h" and compile the program with "clang++ matrix-5.cpp". The running result should look like:


Constructor called for a 3*4 matrix.
Constructor called for a 3*4 matrix.
Copy constructor called for a 3*4 matrix.
Constructor called for a 3*4 matrix.
Destructor called for a 3*4 matrix.
   3   3   3   3
   3  12   3   3
   3   3 101   3
Constructor called for a 4*3 matrix.
   3   3   3
   3  12   3
   3   3 101
   3   3   3
Destructor called for a 4*3 matrix.
Destructor called for a 3*4 matrix.
Destructor called for a 3*4 matrix.
Destructor called for a 3*4 matrix.