C++ Rational Class