May 09, 2006 Re: wsprintf with floats | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve & Denise De Chellis | 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 |
Copyright © 1999-2021 by the D Language Foundation