2.8. Wrap-Up
You learned many important basic
features of C++ in this chapter, including displaying data on the screen,
inputting data from the keyboard and declaring variables of fundamental types.
In particular, you learned to use the output stream object cout and the input stream object cin to build simple interactive programs. We
explained how variables are stored in and retrieved from memory. You also
learned how to use arithmetic operators to perform calculations. We discussed
the order in which C++ applies operators (i.e., the rules of operator
precedence), as well as the associativity of the operators. You also learned how
C++'s if statement allows a program to make
decisions. Finally, we introduced the equality and relational operators, which
you use to form conditions in if statements.
The non-object-oriented
applications presented here introduced you to basic programming concepts. As
you'll see in Chapter
3, C++ applications typically contain just a few lines
of code in function main—these statements
normally create the objects that perform the work of the application, then the
objects "take over from there." In Chapter
3, you'll see how to implement your own classes and
use objects of those classes in applications.