user152508
user152508

Reputation: 3131

Stringizing argument of macro to be unicode

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?

Upvotes: 2

Views: 493

Answers (1)

Some programmer dude
Some programmer dude

Reputation: 409176

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

#define WIDEN(x)  L ## #x

Upvotes: 5

Related Questions