The above will result in no formatting at all.
How do I format my number so that it is only ever 3 characters before the decimal point and 2 after the decimal point. i.e my string will only ever be 6 characters long (including the decimal point)
however keep in mind that if the number actually has 4 digits to the left of the decimal point, you'll get all 4, which
will blow your 6-character limit. You'll need to postprocess that (and deal with a floating point number that has
7 digits to the left of the decimal).
Of what use would boost::format be if it truncated? Would you want it to truncate 1234567 to 123456 or 234567,
neither of which is even close to the number you asked it to output?