vsprintf: how to get rid of the terminating zeros when using a float value?

Started by
1 comment, last by MrSandman666 23 years, 7 months ago
I use the vsprintf function in my program and I want it to print a float type variable like i.e. 5.67 but what it displays is 5.670000 using 5.67f doesn''t change anything. has anyone solved this problem?
-----------------------------"Mr Sandman bring me a dream"
Advertisement
You''ll have to parse through the format parameter and change all the %f to %.2f

Pray there are no %.6f in there




Hey, thanx!
That made it!
It worx now!
Many thanx!
-----------------------------"Mr Sandman bring me a dream"

This topic is closed to new replies.

Advertisement