answersLogoWhite

0


Best Answer

The main advantage of the newer C++ comment syntax is that you only need to start the comment, and you can expect that it will last only until the end-of-line. With the older syntax, you needed to also stop the comment. any statement; /* old comment syntax */

any statement; // new comment syntax

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Putting comments in your program will help someone understand what you are doing in your program or just certain parts of it. If someone was to read your program it will be hard for them to follow and understand what you are doing in the program without comments to explain what is going on.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Comments provide yourself and other programmers with information about the code. Good commenting will increase the overall productivity of you team since you do not have to go back and figure out what a particular function/class is doing every time, you can read the comments instead.

Remember, your source code will be compiled and optimized by a machine, but read and modified by a human being.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Documentation; giving hints to the person who will read the program a few years later.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Giving information to a human reader.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the main purpose of using comments in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the purpose of using comments in c plus plus?

Comments are to help other programmers (or yourself in the future) to understand what is going on in a program, especially when the code itself is complicated and may not be obvious. More time is spent maintaining and improving programs than original development, so leaving clear comments is very important!


How do you write a programm in c plus plus without using function main?

I don't think its possible. Every C++ program must at least have the main function.


How have YouTube comments changed since Google forced users to post under Google Plus?

Comments critical of Google Plus are censored, and everything posted on Google is also posted on Google Plus.


What is the main purpose of reduction of pyruvate to lactate during fermentation?

The main purpose of pyruvate reduction to lactate during fermentation is to convert NADH to NAD plus. Early in the glycolysis process, you'll see that there's a step where NAD plus gets reduced to NADH, and then an ATP is produced.


Any program in c plus plus without using any header file?

For example: int main (void) { return 0; }


How do you display stars in c plus plus using the if else structure and a for loop and you use void main?

It depends on what program you design really


What is the purpose of collaboration solutions?

The main purpose of collaboration solutions is to enable people to involve themselves in a common task to achieve goals. A definition of this is "intentional group processed plus software to support them".


How do you wrte aprogramme on c plus plus?

#include<iostream> int main() { using namespace std; cout<<"Hello world!"<<endl; return( 0 ); }


Give an example of C plus plus program?

#include<iostream> int main() { using namespace std; cout<<"Hello world!"<<endl; return(0); }


What is the purpose of C plus plus?

Computer programming.


How do you limit the floating in C Plus Plus in output statement?

Use setprecision.Example:#include #include using namespace std; int main() { double f = 3.14159; cout


Sample programs in c plus plus language using pointers?

#include int main (int argc, char **argv){int i;for (i=0; i