Chapter 1 - Review of C++ basics
How to name a value
How to pass objects by-value
How to pass objects by-reference
How to pass objects by-const-reference
How to send a message to a const object
How to create and destroy heap objects
Lab
Chapter 2 - Namespaces
What is a namespace?
Why were namespaces introduced?
How to create a namespace
How to choose which namespace to use
The namespace std
The namespace anonymous
Lab
Chapter 3 - How to create a class
How to create a class named my_class
The Life of an Object
How to add a constructor
How to invoke a constructor
How to add a copy constructor
How to add a destructor
How to add a non-member function
Constraints on builtin arrays
Lab
Chapter 4 - Overloaded operators
Syntactic sugar
How to chain (a.k.a. cascade) operator+
How to add assignment
Why is operator+ a non-member function?
How to add input from the keyboard
How to add output to the screen
How to add comparisons
How to add arithmetic
Operators similar to
How to add subscripting
What you cannot do
Overloaded operators
Lab
Chapter 5 - How to add a data member
How to add a data member
Unaffected
Lab
Chapter 6 - Inheritance
Static type versus dynamic type
Non-virtual, virtual, and pure virtual functions
Substitutability
Inheritance and constructor: base class
Inheritance and constructor: derived class
Inheritance and copy constructor: base class
Inheritance and copy constructor: derived class
Inheritance and destructor: base class
Inheritance and destructor: derived class
Inheritance and assignment: base class
Inheritance and assignment: derived class
Inheritance and input from the keyboard: base class
Inheritance and input from the keyboard: derived class
Inheritance and output to the screen: base class
Inheritance and output to the screen: derived class
Inheritance and subscripting: base class
Inheritance and subscripting: derived class
Lab
Chapter 7 - Exception handling
Error Handling
assert
try, catch, throw
How to throw a value of builtin type
How to throw a value of class type
How to throw a value of class type: inheritance
What happens to local variables of class type?
What happens to heap variables?
Automatic deleters
Standard exception classes
std::exception
std::exception subclasses
Lab
Chapter 8 - Inline functions
How to inline a non-member function
How to inline a member function, #1
How to inline a member function, #2
Lab
Chapter 9 - File I/O
How to open a file for writing
How to open a file for reading
Lab
Chapter 10 - Overloading new/delete
How to overload new and delete for a class
Lab
Chapter 11 - Templates
Function template
Class template
Lab
Chapter 12 - How to generalize a function
The find algorithm, version 1
Assumptions, version 1
Transformation
The find algorithm, version 2
Assumptions, version 2
Accessing builtin array elements
Transformation
The find algorithm, version 3
Assumptions, version 3
Transformation
The find algorithm, version 4
Assumptions, version 4
Transformation
The find algorithm, version 5
Assumptions, version 5
Replacing builtin pointers with iterators
Transformation
The find algorithm, version 6
Assumptions, version 6
Container
Transformation
The find algorithm, version 7
Assumptions, version 7
Lab
Chapter 13 - Functors
How to create an object that behaves like a function
Lab
Chapter 14 - STL
What is STL?
Kinds of containers
vector's implementation
vector
The container vector
Notes
list
The container list
Notes
deque
The container deque
set
The container set
multiset
maps and pairs
map
The container map
multimap
Differences among containers
How to make your own algorithm
Lab
Chapter 16 - Multiple inheritance
Can a class have more than one superclass?
What is multiple inheritance?
Example: Multiple inheritance
Do I inherit attributes multiple times?
Do I inherit operations multiple times?
Resolving ambiguity
Should I avoid multiple inheritance?
What to do if multiple inheritance is inappropriate
A good example of multiple inheritance
Bank accounts - the wrong way
Bank accounts - the right way
Lab
Chapter 17 - Cast operators
The Cast operator
The static_cast operator
The reinterpret_cast operator
The const_cast operator
The dynamic_cast operator
Lab
Chapter 18 - RTTI
How to determine the type of an object at runtime
Notes
Lab
Chapter 19 - Pointers to members
Pointer to non-member function
Pointer to member function
Lab