DON'T use float
s for financial data, EVER.
This will get you into all kinds of rounding and precision problems, and you DON'T want them in data that describes money sums. Unless you like getting sued, of course :).
Either use integer types or create a fixed-point type.
Also, don't use system()
, if possible. This is inherently non-portable, not to mention being slow and ugly.
Until you fill up more code, this is about all that I can tell you. Good luck!
slacker
2010-03-20 22:25:13