If I have a define like for instance this,
#define COUNT 16
and want to create macro in C++ that would return the string of that define, "16" in this case, is this possible to do in any way in C++? I've tried a number of ways with the token pasting operator, stringizing operator etc., but can't get it right. I can get the string of the define as "COUNT", but not the expanded value which I'm interested in.
The whole point is of course so I don't have to update both the int value and a string value when I fiddle around with the count. The string is needed for passing the value down as a #define to a shader.
#define COUNT 16
and want to create macro in C++ that would return the string of that define, "16" in this case, is this possible to do in any way in C++? I've tried a number of ways with the token pasting operator, stringizing operator etc., but can't get it right. I can get the string of the define as "COUNT", but not the expanded value which I'm interested in.
The whole point is of course so I don't have to update both the int value and a string value when I fiddle around with the count. The string is needed for passing the value down as a #define to a shader.