O'Reilly logo

Sams Teach Yourself C++ in 24 Hours, Third Edition by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comments

When you are writing a program, it often seems clear and self-evident what you are trying to do in the program. Funny thing, though—a month later, when you return to the program, it can be quite confusing and unclear. I'm not sure how that confusion creeps into your program, but it's always there.

To fight the onset of confusion and help others understand your code, you'll want to use comments. Comments are simply text that is ignored by the compiler, but that might inform the reader of what you are doing at any particular point in your program.

Types of Comments

A comment is text that does not affect the operation of the program, but ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required