Skip to main content
GameDev.net gamedev.net
🔒 Locked

What are the flags for vsprintf() function

Started by Rabbi Jun 28, 2004 at 7:43 AM 3 replies 500+ views
Original Post
Rabbi
Rabbi
I know that the function "vsprintf()" can be used like: char text[256]; va_list ap; va_start(ap, "Text - %7.2f"); vsprintf(text, "Text - %7.2f", ap); va_end(ap); As long as a float is passed to the function... But has anyone got a list of the possible flags like "- %7.2f" that can also be passed to the function, or a reference to where I could find them? Thanks
Paradigm Shifter
Paradigm Shifter
Look up:

Format Specification Fields: printf and wprintf Functions

in MSDN.
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
cozman
cozman
vsprintf can use the standard printf flags.

here's a list of them

(it also seems to me you could use sprintf for what you're doing, but if your example above is just an example, don't worry about it)
TangentZ
TangentZ
You mean like MSDN?
神はサイコロを振らない!
Rabbi
Rabbi
Wow that was fast!!

Thanks for your help guys

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.