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

Statements

A statement controls the sequence of execution, evaluates an expression, or does nothing (the null statement). All C++ statements end with a semicolon.

A common simple statement is the assignment:

x = a + b;

Unlike in algebra, this statement does not mean that x equals a+b. This is read, “Assign the value of the sum of a and b to x,” or “Assign to x, a+b.” Even though this statement is doing two things, it is one statement and, therefore, has one semicolon. The assignment operator assigns whatever is on the right side to whatever is on the left side.

Whitespace

Spaces, along with tabs and new lines, are called whitespace. Extra whitespace ...

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