%s %d %f sprintf
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?
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 ]
Do NOT let Dr. Mario touch your genitals. He is not a real doctor!
%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]
-------
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 ]
Do NOT let Dr. Mario touch your genitals. He is not a real doctor!
quote:Original post by eldee
meh, i guess i knew that.. just easier for me to remember ''d-double''
Try ''d-digit''
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement