In this chapter, we evolve a small program to exercise the fundamental components ofthe C++ language. These components consist of the following:<br> 1. A small set of data types: Boolean, character, integer, and floating point.<br> 2. A set of arithmetic, relational, and logical operators to manipulate these types.<br> 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.<br> 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.<br> 4. A small number of compound types, such as a pointer and an array. These allow us, respectively, to refer indirectly to an existing object and to define a collection of elements of a single type.<br> 5. A standard library of common programming abstractions, such as a string and a vector. <br> ……
展开