A matrix class in C++