I have a macro I use for debugging.
#define diagnostic_arg(message,...) fprintf(stderr,message,__VA_ARGS__)
I've found that I need to use wide-chars in my program, so I would like to change just my macro and have everything work:
#define diagnostic_arg(message,...) fwprintf(stderr,message,__VA_ARGS__)
However, I need wide character strings, which are defined by putting an L
in front of the string's beginning quote mark:
#define diagnostic_arg(message,...) fprintf(stderr,Lmessage,__VA_ARGS__)
Now obviously, the above line doesn't work. But if I use L message
, that won't work either. So how do I write Lmessage
and have it do what I would like?
TEXT()
macro is a Microsoft thing - I don't think it's as common in the non-Windows world (but maybe I'm wrong). In any case, it's easy enough to implement yourself. – Sacrificial