Skip to Content
The C++ Programming Language, 4th Edition
book

The C++ Programming Language, 4th Edition

by Bjarne Stroustrup
May 2013
Intermediate to advanced
1376 pages
47h 26m
English
Addison-Wesley Professional
Content preview from The C++ Programming Language, 4th Edition

9. Statements

A programmer is a machine for turning caffeine into code.

– A programmer

Introduction

Statement Summary

Declarations as Statements

Selection Statements

if Statements; switch Statements; Declarations in Conditions

Iteration Statements

Range-for Statements; for Statements; while Statements; do Statements; Loop exit

goto Statements

Comments and Indentation

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, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming: Principles and Practice Using C++, 3rd Edition

Programming: Principles and Practice Using C++, 3rd Edition

Bjarne Stroustrup

Publisher Resources

ISBN: 9780133522884Purchase Link