%s %d %f sprintf

Started by
6 comments, last by Leadorn 20 years, 11 months ago
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?
Advertisement
%ul

The usual stuff goes here for a signature.
Thanks
quote:Original post by Leadorn
and what is %d %s %f are they some inbuilt operators?


double, string, float (in that order)

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

::evolve::

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

-eldee;another space monkey;[ Forced Evolution Studios ]
%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]
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!

-eldee;another space monkey;[ Forced Evolution Studios ]
quote:Original post by eldee

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


Try ''d-digit''
And the price we paid was the price men have always paid for achieving paradise in this life -- we went soft, we lost our edge. - "Muad'Dib: Conversations" by the Princess Irulan
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]
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.

This topic is closed to new replies.

Advertisement