-
Install C++ on Macintosh.
Not required for this course.
- Pointers
-
Binary
(base 2)
and hexadecimal
(base 16) notation for a whole number
-
A
pointer
is a variable that contains the address
of another variable.
-
Linux commands.
-
Dynamic
memory allocation with the operators
new
and delete
.
-
Allocate an array with an unpredictable number of elements.
-
Allocate an unpredictable number of variables.
-
Preprocessor implements directives such as
#include
#define
#ifndef
needed for writing a header
(.h
)
file for a class
-
Classes.
-
The components of a class
- data members vs. member functions
- public members vs. private members
- constructors vs. destructor
- header (
.h
) file and implementation (.C
) file
- static members and friend functions
-
Now that the data members are private,
we can re-implement a class (class
date
)
in different ways without disturbing the rest of the program.
- Class
date
with two non-static data members
- Class
date
with one non-static data member
-
Use an object to trigger a pair of events:
class
announcer
.
-
More examples:
class
point
,
class stack
,
class myrandom
.
-
Midterm review.
-
Midterm.
-
Operator overloading.
-
Operators that use the value of an existing object:
==
-
Operators that change the value of an existing object:
+=
-
Operators that create and return a new object:
binary
+
-
Operators that perform input and output,
and return a stream:
<<
>>
-
An operator for an object that does only one job:
()
-
Inheritance and polymorphism.
- Single inheritance and polymorphism
- Multiple inheritance and virtual base classes
- Abstract base classes and pure virtual functions
- Public inheritance vs. private inheritance
-
Templates.
- Template functions
- Template classes