It's been a long time since I did it but I used '%.0lf' to format a double with no decimal places. '%6.6s' to format a string with exactly six characters. I am sure there are differences I have forgotten but it is similar to printf. Larry On 1/19/2019 4:32 PM, Michael Powell via Boost-users wrote:
Hello,
How do I format floating point values, either double or float? I want to specify things like the precision during the formatting, i.e. how many digits to include in the fractional digits, and so forth.
Currently, I am using this, for instance:
General: "%1$g" Fixed: "%1$f" Scientific: "%1$e" or "%1$E" (depending on whether lower or upper case, respectively)
Thanks!
Best regards,
Michael Powell _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users