E
Eric
Hello all,
I've got this line of given code (cannot change this; wizard-generated, but
value may change someday):
#define IDB_BUTTON 225
Somewhere in the code I found / need this:
.....somefunction("#225")....
This string in the function call is the same number like in the define, but
the constant wasn't used. Because for future changes and for readability I
wanted to create this string with a preprocessor macro like this:
.....somefunction(MYMACRO(IDB_BUTTON))....
I didn't get such a macro to work. I tried:
#define MYMACRO(num) "#" #num
but this only yields to
.....somefunction("#" "IDB_BUTTON")....
I also tried with the token-pasting operator (##) etc.
Is this possible at all?
Eric
I've got this line of given code (cannot change this; wizard-generated, but
value may change someday):
#define IDB_BUTTON 225
Somewhere in the code I found / need this:
.....somefunction("#225")....
This string in the function call is the same number like in the define, but
the constant wasn't used. Because for future changes and for readability I
wanted to create this string with a preprocessor macro like this:
.....somefunction(MYMACRO(IDB_BUTTON))....
I didn't get such a macro to work. I tried:
#define MYMACRO(num) "#" #num
but this only yields to
.....somefunction("#" "IDB_BUTTON")....
I also tried with the token-pasting operator (##) etc.
Is this possible at all?
Eric