The only purpose of comments is to make yourself or others a note, did I understand it correctly? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

The only purpose of comments is to make yourself or others a note, did I understand it correctly?

4th Sep 2016, 4:34 PM
Marcel
2 Answers
+ 3
Exactly. It exists solely to help others read your code and make reminders for yourself and co-workers. Might as well prove useful for debugging ("deleting" a line of code temporarly).
5th Sep 2016, 8:35 AM
Norbivar
Norbivar - avatar
0
Yes, but comment scripts exist too: // cout << "this is a commented script" /* cout << "this is a multiline commented script" */
4th Sep 2016, 5:22 PM
Edward