Last active
August 29, 2015 14:21
-
-
Save mattn/d95eaa2d01fc96399db8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <shlwapi.h> | |
int | |
main(int argc, char* argv[]) { | |
char buf[256]; | |
strcpy(buf, "XXXXXXXXXXXXXXX"); | |
_snprintf(buf, 8, "1234%s", "abcdef"); | |
puts(buf); | |
return 0; | |
} | |
// mingw 1234abcdXXXXXXX, msvc 1234abcdXXXXXXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <shlwapi.h> | |
int | |
main(int argc, char* argv[]) { | |
char buf[256]; | |
strcpy(buf, "XXXXXXXXXXXXXXX"); | |
wnsprintf(buf, 8, "1234%s", "abcdef"); | |
puts(buf); | |
return 0; | |
} | |
// mingw 1234abc, msvc 1234abc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment