www.gibmonks.com

Main Page




Previous Page
Next Page

[Page 65 (continued)]

2.9. Wrap-Up

You learned many important 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 will see in Chapter 3, C++ applications typically contain just a few lines of code in function mainthese statements normally create the objects that perform the work of the application, then the objects "take over from there." In Chapter 3, you will learn how to implement your own classes and use objects of those classes in applications.


Previous Page
Next Page