lang:c:preprocesseur
Ceci est une ancienne révision du document !
Convertir un nombre en chaîne de caractères
#define STR_HELPER(x) #x #define STR(x) STR_HELPER(x)
Exemple d'utilisation :
#define GCCVERSION STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__)
C Preprocessor_ concatenate int to string - Stack Overflow Archive du 28/03/2011 le 17/10/2019
Ecrire un commentaire dans une macro multi lignes
#define SOME_BIG_MACRO(input)\
SOME_FUNCTION_CALL() /* this does... */ \
SOME_OTHER_FUNCTION_CALL()
lang/c/preprocesseur.1583519974.txt.gz · Dernière modification : 2020/03/06 19:39 de root