By Gregory Satir, Doug Brown
Price: $29.95 USD
£20.95 GBP
Cover | Table of Contents | Index | Colophon
Preface
Chapter 1. Object-Oriented Programming with Classes
Object-Oriented Programming
ClassesChapter 2. C++ Without Classes
Three to Start
Function Changes
Stricter Typing
Dynamic Initialization of Globals
Some Final ListsChapter 3. Abstraction with Member Functions
The Abstraction
Using a struct
Using a struct with Interface Functions
Using a Class with Member FunctionsChapter 4. Encapsulation with Access Specifiers
Access Specifiers
A Member Can Have Any Access Level
Unlimited Access Specifiers
Private Does Not Mean Invisible
Friend ClassesChapter 5. Hierarchy with Composition and Derivation
Composition
Derivation
ChainingChapter 6. Better Abstraction with Constructors and Destructors
The Default Constructor
The Destructor
Built-in Types
Hierarchy and Chaining
Implicit Default Constructors and Destructors
Beyond Chaining
Explicit Invocation
Flow of Control
Time of InvocationChapter 7. Better Abstraction with new and delete
Dynamic Objects
Dynamic Arrays
Mixing Allocators
realloc()
Out of MemoryChapter 8. References
Parameter Versus Argument
Passing by Value in C and C++
Passing by Reference in C++
Reference Versus Pointer
Returning by Reference in C++
Overloading: Reference Versus Value
Binding ProblemsChapter 9. Better Abstraction with Other Special Member Functions
Assignment Operator
Copy Constructor
Printing an Object
SummaryChapter 10. An Example Class
Using an int
Using a Static Array
Using a Dynamic Array
Using a Reference-Counted String
Copy Constructor Quiz
Summary TableChapter 11. Better Hierarchy with Templates
Defining a Template
Using a Template to Define an Object
Careful with That Expansion, Eugene
Modifying Container Class ElementsChapter 12. Polymorphism with Virtual Functions
Polymorphism in C
Virtual Functions
Polymorphism in C++
More About Virtual FunctionsChapter 13. More About Polymorphism
Abstract Classes
Derivation Decisions
Virtual Decisions
Calling Virtual Functions from Constructors and Destructors
Under the Hood
PitfallsChapter 14. Implementing an Object-Oriented Design
Implementation Table
Examples
Is-A, Has-A
Defensive ImplementationChapter 15. An Example Program
The String Class
The Rule, CwRule, and HwRule Classes
The Scanner Class
Using the Program
Example CodeChapter 16. What to Study Next
const
inline
Constructors with Parameters
Member Initialization Lists
Efficient Copy Constructor
Special Member FunctionsAppendix A. C++ Operators
Appendix B. One Problem with Returning by Value
Glossary
Index
Return to C++ The Core Language