a matrix class written on C++