A simple matrix operations program in C++