My understanding is the preprocessor #define
replaces identifier with replacement
#define <identifier> <replacement>
Let's suppose we have the following:
#define SLOT(a) "1"#a
void myValue(int value);
SLOT(myValue(int));
I understand that #
means take the string literal. Thus, after the macro, wouldn't we have
"1""myValue(int)"
... essentially two string literals back to back. I am guessing the preprocessor automatically concatenates two string literals back to back. Is this true? Where can I find information on this fact?
Yes your understanding is right.
#
operator is stringizer operator.