Chapter 6. Expressions and Statements
Premature optimization is the root of all evil. | ||
--D. Knuth |
On the other hand, we cannot ignore efficiency. | ||
--Jon Bentley |
Desk calculator example — input — command line arguments — expression summary — logical and relational operators — increment and decrement — free store — explicit type conversion — statement summary — declarations — selection statements — declarations in conditions — iteration statements — the infamous goto — comments and indentation — advice — exercises.
A Desk Calculator
Statements and expressions are introduced by presenting a desk calculator program that provides the four standard arithmetic operations as infix operators on floating-point numbers. The user can also define variables. ...
Get The C++ Programming Language, Special 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.