Code: Select all
#define THIS_FANCY_DEFINE 1234
Code: Select all
"THIS_FANCY_DEFINE is 1234"
this is what I was trying to do:
Code: Select all
# define DESC(a) { "" ##a "", a }
typedef struct {
const char* name;
int value;
} desc;
desc array[] = { DESC(THIS_FANCY_DEFINE) };
int
main()
{
printf ( "%s: %d\n", array[0].name, aray[0].value );
}
So, basically I need to supress macro expansion in one case. Does anyone know how to do this?