vsprintf: how to get rid of the terminating zeros when using a float value?
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?
You''ll have to parse through the format parameter and change all the %f to %.2f
Pray there are no %.6f in there
Pray there are no %.6f in there
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement