Chapter Summary

  1. Introduction
    A brief discussion of the book's background and contents.
     

  2. The basics
    The form of a simple C++ program is explained. Comments, names, the fundamental types, constants and simple input and output are discussed.
     
  3. Variables and Expressions
    Variables, operators and expressions are explained in this chapter. All the important C++ operators are discussed. How to use the standard C++ string class is explained. Type conversion and side effects are also discussed.
     
  4. Controlling Execution
    The control statements available in C++ are described. These include if, switch, while, do and for statements.
     
  5. Compound Types
    The use of structures and arrays is explained. Pointers and memory management are introduced. Other material covered in this chapter includes typedef names, reference types, and old C style strings.
     
  6. Functions
    Functions and their use are explained. The different sorts of parameters and return values that can be used with function are described. Recursive functions are discussed.
     
  7. Classes
    This introduces the concept of classes and shows how class objects can be used to build programs. Constructors and destructors are explained.
     
  8. More about Classes
    This chapter introduces more material on classes. Inline member functions, static members, constant objects and members, nested classes and separate compilation are amongst the C++ class features discussed.
     
     
  9. Friends and Operators
    Friend functions and classes are explained, and operator overloading is introduced.
     
  10. Inheritance
    This extends the previous chapters by showing how inheritance can be used to build class hierarchies. Single and multiple inheritance and some aspects of C++ design style are discussed.
     
  11. Virtual Functions
    Some of the more advanced aspects of C++ programming are considered in this chapter. The concept of polymorphism is introduced. Virtual functions and pointers to objects are presented as one method of supporting polymorphism in C++.
     
  12. Templates
    This chapter introduces templates as an important feature of C++. Function templates are explained. Generic and container classes are discussed, and C++ class templates are introduced to support these concepts.
  13. Advanced Features
    This final chapter introduces some of the newer features of C++. Exception handling, casting, run-time type information and name spaces are all discussed. In particular, casting is explained in detail because of the dangers associated with the use of this feature.
  14. More Input and Output
    The use of the standard C++ input and output streams has already been introduced, but this chapter provides much more detail. Topics that are discussed include the standard streams, setting flags and parameters, named files, and how to detect and manage stream errors and end of file conditions. Appendices