Chapter 1. Basic C++ Programming

In this chapter, we evolve a small program to exercise the fundamental components of the C++ language. These components consist of the following:

  1. A small set of data types: Boolean, character, integer, and floating point.

  2. A set of arithmetic, relational, and logical operators to manipulate these types. These include not only the usual suspects, such as addition, equality, less than, and assignment, but also the less conventional increment, conditional, and compound assignment operators.

  3. A set of conditional branch and looping statements, such as the if statement and while loop, to alter the control flow of our program.

  4. A small number of compound types, such as a pointer and an array. These allow us, respectively, ...

Get Essential C++ 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.