C++ Language/Preprocessing/PreprocessingStrings

From Wikibooks, open books for an open world
Jump to navigation Jump to search

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)