c++ class of common fractions