Syntax
Multi-line comments are enclosed by a starting/* token and a terminating */ token. Every character between these two delimiters is ignored by the compiler.
Lexical Rules and Behavior
1. Inline Placement Because multi-line comments have explicit termination tokens, they can be placed inline within a single statement. They are valid anywhere a whitespace character is valid, provided they do not split a single language token (such as an identifier or a keyword).*/ sequence it encounters, regardless of how many /* sequences preceded it. Attempting to nest these comments leaves trailing text exposed to the compiler.
/*) appears after a single-line comment initiator (//) on the same line, it is treated as standard text within the single-line comment and does not begin a multi-line comment block. Conversely, a // sequence inside a /* ... */ block has no special meaning and is ignored.
/* or */ sequences appear within double quotes (" ") or single quotes (' '), they are evaluated as standard character data rather than comment delimiters.
\ immediately followed by a newline), the preprocessor will splice the lines together before tokenization, successfully forming the comment delimiter.
Tired of Poor C++ Skills? Fix That With Deep Grasping!Learn More





