May 09, 2006
In article <afvcvu$26q7$1@digitaldaemon.com>, Steve & Denise De Chellis says...
>
>How do I use wsprintf with a float? I tried %f but it just printed f
>
>If i use %i it cuts off the decimal...
>
>Steve De Chellis
>

I don't know who's still listening here, but after finding this paste via a
google link, I later worked out a solution.  So wsprintf() doesn't support
floating point numbers at all.  Just do "wsprintf(yourBuffer, "%d.%d",
(int)smallvalue, (int)(smallvalue/1000));", it works too.  Thought I'd share
that tip.

Mindstorm
www.mindstormgames.com
February 14, 2007
This forum is dead, but thanks for the tip.
1 2
Next ›   Last »