unterminated comment

unterminated comment.

Causes


  • The compiler reached the end of the file while scanning a comment.
  • The code may be missing a closing comment marker */

Example


Output


How to fix it ?


  • Be sure to terminate multi-line comments with “*/”

syntax


“multi-line” comments

/* comment */

“single-line” comments.

// comment

Notes


  • Single line comment does not need to terminate, and it starts by a double slash (//)
  • multiple line comment needs to be terminated by */ (asterisk and slash).
  • Comments are ignored by the compiler.

See also


Subscribe to our channel

Leave a Reply

Your email address will not be published. Required fields are marked *