Jump to content
  • Advertisement
Sign in to follow this  
Shmuel

wsprintf equivalent

This topic is 5100 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm programming a game that uses SDL and I don't want to limit it to the windows platform by using any of the windows only functions. Teh book I'm using uses the function wsprintf, which is defined in windows.h. My question is: Is there a c or C++ function like wsprintf? I know about sprintf, but it doesn't append to the string does it? I wasn't sure about that.

Share this post


Link to post
Share on other sites
Advertisement
wsprintf is not a windows-only function, tho it is not a POSIX function. swprintf is more common on UNIX boxes. Note that the only substantial difference between wsprintf and sprintf is that wsprintf uses wide (international) characters.

Share this post


Link to post
Share on other sites
No, he means swprintf. It is part of the CRT, which should be with all C compilers.

int sprintf( char *buffer, const char *format [, argument] ... );
int swprintf( wchar_t *buffer, const wchar_t *format [, argument] ... );

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!