Gary Wessle wrote:
is there a method to trim the number of decimals to a given length.
During input or output? For output see 'setprecision' manipulator. For
input, I am not sure of the sensible way of doing that.
those numbers are read off a text file, they will need to be atof(ed)
If you intend to use 'atof' literally, I caution you - it's not a good idea.
Consider using 'strtod' instead.
either before or after trimming, whats the right way to do this?
Use 'strtod', and there is no need to trim during input, AFAIK. Why do you
think you need to trim?
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask