Lecture 4

Learning objectives

After this class (which mostly reviews C++ material that you should already know!), you should be able to:

  1. Explain why templates are normally defined in .h files.
  2. Define and use template functions and classes.
  3. Explain how a friend function is different from others.
  4. Use basic features of the STL vector and list classes.

Reading assignment

  1. Chapter 1, sections 1.6-1.7 (except section 1.6.4).
  2. www.sgi.com/tech/stl has a good reference on STL.
  3. Lecture: Templates.

Exercises and review questions


Last modified: 7 Sep 2011