A Simple Program

This simple program doesn't actually do anything, but the compiler doesn't care. You can compile and run this program with no problem.

Line Numbers in Code

The following listing contains line numbers. These numbers are for reference within the book. You should not type them in your editor. For example, in line 1 of Listing 1.1, you should enter

int main(int argc, char* argv[])
Listing 1.1. main.cpp—an Empty Program
1: int main(int argc, char* argv[])
2: {
3:    return 0;
4: }

Make certain that you enter this exactly as shown (minus the line numbers). Pay careful attention to the punctuation. Line 3 ends with a semicolon; don't ...

Get SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.