Operations with matrix using C++ language