Is there a way to get the C++ pre processor to expand a #define'ed value into a string literal?
for example:
#define NEW_LINE '\n'
Printf("OutputNEW_LINE"); //or whatever
This looks to me like it should be possible as it's before compilation?
Or is there a better design pattern to achieve this kind of behaviour (without resorting to runtime fixes like sprintf)?
Thanks
EDIT i understand that #define's can be evil, but for arguments sake...
ADDITIONAL Does anyone have any criticism of this approach?