Comments


Summary


Why should I use comments


A comment is some text that is completely ignored by the compiler. This means that you can write everything in it. Using comments is very useful when your project is growing, or if you work with other people, to give explanations about what a function does, why you did use an algorithm instead of another one, or to have a reminder.

Single-line comments


Single-line comments do end at the end of the line.

// some text
// which continues
// on the other lines
and here you get an error

Multi-line comments


Multi-line comments are delimited by /* and */.

/*
    some text
    which continues
    on the other lines
*/