0

Can I use the token-pasting operator ## in the following way:

#define NameIs 0xFFFF
#define PASTE NameIs
#define foo(text) My##text##Andrey

foo(PASTE);

...and don't get -> "MyPASTEAndrey" getting the correct option -> "MyNameIsAndrey"

The problem is that the preprocessor doesn’t seem to understand that I want it to step one level deeper into the "paste," and I’m aware of this. Are there any clever workarounds for this? Can I directly control the expansion or non-expansion of a macro?

1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.