Archived

This topic is now archived and is closed to further replies.

Leadorn

%s %d %f sprintf

Recommended Posts

Hi I’m using unsigned long for my world coordinates and when I convert them to ASCII with sprintf(szt,"%d %d",worldx,worldy); sprintf will print them as signed long integers. For the moment I use _ultoa to convert to ASCII, is there a %d for unsigned long? and what is %d %s %f are they some inbuilt operators?

Share this post


Link to post
Share on other sites
quote:
Original post by acraig
%d is actually a signed decimal integer. See sprintf for a list of format specifiers.

-------
Andrew
PlaneShift - A MMORPG in development.


[edited by - acraig on May 4, 2003 5:06:04 PM]


meh, i guess i knew that.. just easier for me to remember ''d-double''

-eldee
;another space monkey;
[ Forced Evolution Studios ]


::evolve::

Do NOT let Dr. Mario touch your genitals. He is not a real doctor!

Share this post


Link to post
Share on other sites
quote:
Original post by Jedyte

Try 'd-digit'




try 'd-decimal'. x-hex, o-octal.


To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

[edited by - jenova on May 5, 2003 8:41:06 AM]

Share this post


Link to post
Share on other sites