Fraction calculator with order of operations implemented in C++