+ 5
What is the use of comment? And further how a comment be used?
8 ответов
+ 12
Comments are very useful and very helpful specially when there are a lot of programmers involved. They are important to clearly state what has been done so you or anyone else who is involved in the project will now exactly what you did and where did you stop at that moment. Comments are good practice and they are what defines a good programmer. I hope this helped.
+ 4
consider you are working on a larger programme
And you dont code it fot a while
When you open the programme after a while you may not remember what tou where doing
So If leave a comment it would be useful
+ 3
its a helper to identify quickly
+ 1
a comment tells to someone else what are you doing in the programm. And further helps you to remind what the code does
+ 1
Comments are used for documentation.
There are two types of comments in C++:
1. single-line comment, code:
// This is a comment
2. Multiline comment, code:
/*
This is line #1
This is line #2
...
*/
0
Comments are more for you or anyone who looks at your code. its used to explain what code does or just leave notes for yourself/others.
0
Comments are used to save your program so that it doesn't run
0
/*
This is your program
And your codes
*/