Decimal in C++

Hello,

I will write a financial program in C++, but I don't know how to deal with decimal numbers. I know that if I work with floating-point types I will have problems. So, does anyone know a good decimal implementation in C++? Thank you.
Represent values as cents or smaller quantities:
int money=1; //($ .01)
The problem is that I'm looking for something similar to the HP12c. I'm looking for a decimal implementation that holds numbers like 9999999999.00001 or bigger. Something like Java BigDecimal ou Python Decimal class.
Well, 9999999999.00001 is well inside the 64-bit limit, but if what you want is arbitrary precision, Google GMP.
Topic archived. No new replies allowed.