Chapter 6. Statements
CONTENTS
Section 6.1 Simple Statements 192
Section 6.2 Declaration Statements 193
Section 6.3 Compound Statements (Blocks) 193
Section 6.4 Statement Scope 194
Section 6.5 The if
Statement 195
Section 6.6 The switch
Statement 199
Section 6.7 The while
Statement 204
Section 6.8 The for
Loop Statement 207
Section 6.9 The do while
Statement 210
Section 6.10 The break
Statement 212
Section 6.11 The continue
Statement 214
Section 6.12 The goto
Statement 214
Section 6.13 try
Blocks and Exception Handling 215
Section 6.14 Using the Preprocessor for Debugging 220
Statements are analogous to sentences in a natural language. In C++ there are simple statements that execute a single task and compound ...
Get C++ Primer, Fourth 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.