December 2013
Beginner
656 pages
16h 42m
English
EXPLORATION 13
![]()
Compound Statements
You have already used compound statements (that is, lists of statements enclosed in curly braces) in many programs. Now it’s time to learn some of the special rules and uses for compound statements, which are also known as blocks.
Statements
C++ has some hairy, scary syntax rules. By comparison though, the syntax for statements is downright simplistic. The C++ grammar defines most statements in terms of other statements. For example, the rule for while statements is
while (condition)statement
In this example, bold elements are required, such as the while keyword. Italic elements stand for other syntax rules. ...
Read now
Unlock full access