Skip to content
Justice Tech School

C++ Comments

// starts a one line comment and /* */ spans several lines. Doxygen style /** */ comments document functions.

Example
cout << "start\n";
// one line
/* several
   lines */
cout << "end\n";

Result

start
end

Exercise

One line comment.

 note

Quiz Test

Which is a multi line comment?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.