9. Statements
A programmer is a machine for turning caffeine into code.
– A programmer
if Statements; switch Statements; Declarations in Conditions
Range-for Statements; for Statements; while Statements; do Statements; Loop exit
• Advice
9.1. Introduction
C++ offers a conventional and flexible set of statements. Basically all that is either interesting or complicated is found in expressions and declarations. Note that a declaration is a statement and that an expression becomes a statement when you add a semicolon at its end.
Unlike an expression, a statement does not have a value. Instead, ...
Get The C++ Programming Language, 4th 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.