Re: Formatting float numbers

2010-08-23 Thread Adriano Brandão
Thanks man, I tested here and it's working now. But, just for curiosity, if I was using only c++ wouldn't I be able to do that? On 22/08/2010, at 19:04, Greg Parker wrote: > On Aug 21, 2010, at 9:59 AM, Adriano Brandão wrote: >> I'm having some troubles in formatting

Formatting float numbers

2010-08-21 Thread Adriano Brandão
Hi, I'm having some troubles in formatting float numbers. If I wish to display 25.342 using only 2 decimal places I could use %.2f and it would do the job. But if the number to be formatted is flat (like 25.000) I get 25.00 as a result. After a little bit of research I found out that I could use