0
Hey, I just started learning C++, and don't get what are comments. They don't show on the output, so what are they for?
5 odpowiedzi
0
How is it supposed to help others read the code, if it doesn't even show on the output?
0
Say you are developing in a team, as an emoloyee for a company, or even by yourself on a large project. When you go back to look at that code it just looks like a big mess. Comments help you to remember where you are and why you did what you did in that block of code. For others it is a way to be able to understand your code and pick up from where you left off. Its our secret messages left for other developers or our future selves.
0
oh, thanks
0
no problem! Happy coding!