For some reason my decimals are coming out wrong. The program asks for your fractions, and will print out the fraction and the decimal underneath, except I can't get my decimals to come out right. I can easily get them to work if I just divide them in the print class, but the assignment calls for a decimal class... What am I doing wrong?
Well, are you actually ever setting numerator to anything in the constructor?
If you don't, it will have a garbage value - the value its current memory area contains - which may be zero if it wasn't used before your program started.
Also, be aware that g == (numerator/denominator); is an integer division, compared to a floating point. You need to cast at least one variable to float or you'll lose the decimals. g = static_cast<float> (numerator) / denominator;