Question

I'm trying to stringize the argument of a macro such that it will give unicode string i.e. I want to do get the following :

WIDEN(4>5)  L"4>5"

And my macro is this :

#define WIDEN(x) L #x

Unfortunately doesn't work. How to do this?

Was it helpful?

Solution

You want to use e.g. the pre-processors contatenating operator ##:

#define WIDEN(x)  L ## #x
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top