Created
February 22, 2019 08:35
-
-
Save bagder/e46bced5b3f38aa446451d895a829527 to your computer and use it in GitHub Desktop.
convert a given define to a string
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> | |
#define xstr(s) str(s) | |
#define str(s) #s | |
int main(void) | |
{ | |
printf("%s\n", xstr(STRING)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment