The #define creates a macro, which is the association of an identifier or parameterized identifier with a token string. After the macro is defined, the compiler can substitute the token string for each occurrence of the identifier in the source file.
https://learn.microsoft.com/en-ca/cpp/preprocessor/hash-define-directive-c-cpp?view=vs-2017
Surprisingly, the question has not been directly asked, rather asking about tokenization
, tokenizer
, tokening
etc. Even searching on DuckDuckGo, the closest question was on quora asking,
And it is not obvious to me whether string token
and token string
would be synonymous. So just to be clear:
What is a token string in c++?