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

Q & A

Q1:What does #include do?
A1: This is a directive to the preprocessor, which runs when you call your compiler. This specific directive causes the file named after the word include to be read in as if it were typed in at that location in your source code.
Q2:What is the difference between // comments and /* style comments?
A2: The double-slash comments (//) “expire” at the end of the line. Slash-star (/*) comments are in effect until a closing comment (*/). Remember, not even the end of the function terminates a slash-star comment; you must put in the closing comment mark or you will get a compile-time error.
Q3:What differentiates a good comment from a bad comment?
A3: A good comment tells the reader why this particular code is doing whatever ...

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