
8 Jun
2010
8 Jun
'10
1:48 a.m.
Hi I read the documentation and looked for some examples but I was not able to come up with a format string to do this: Format a double using desired grouping char and decimal separator. So 1234567.89 should print 1,234,567.89 First, how can I specify the usage of the grouping char ? sprintf uses the ' char but it gave me invalid format string every time I tried to use it. Also how can I specify the grouping char and decimal separator ? By setting the locale ? An example would be great. std::stringstream ss2; ss2 << boost::format ("%|.2f|") % src.get_valor_total (); String svalor_total = ss2.str (); Thank you in advance for your attention, Mau.