Jump to content

C++ Language/Preprocessing/PreprocessingStrings

From Wikibooks, open books for an open world

Two adjacent string literals are treated as if they had been concatenated.

For a string literal that contains a special character (e.g., a newline), either escape that special character (\n) or use a raw-string-literal.

A preprocessor macro can optionally add quotation marks to a macro-parameter while that macro expands.

Additional information about preprocessing strings (includes interactive examples)