Progress doesn’t come from early risers—progress is made by lazy men looking for easier ways to do things.—Robert A. Heinlein, Time Enough for Love


Each C++ function comprises a sequence of statements, which are programming constructs that specify the order of execution. This chapter uses an understanding of the object life cycle, templates, and expressions to explore the nuances of statements.

Expression Statements

An expression statement is an expression followed by a semicolon (;). Expression statements comprise most of the statements in a program. You can turn any expression into a statement, which you should do whenever you need ...

Get C++ Crash Course now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.