Lecture 3

Learning objectives

After this class, you should be able to:

  1. Describe the purpose of the following components of the standard template library: (i) containers, (ii) iterators, (iii) functionals, and (iv) algorithms.
  2. Explain the difference between sequences and associative containers.
  3. Write code that uses the STL iterators.
  4. Write code that uses the following STL algorithms: (i) for_each, (ii) reverse, (iii) sort, and simple features of the following STL containers: (i) vector, (ii) list, and (iii) map.
  5. Look up an STL reference and write code that uses some feature that you are asked to use.
  6. Define and use function classes/objects.

Reading assignment

  1. Section 1.7.
  2. www.sgi.com/tech/stl has a good reference on STL.
  3. Page 31 in the text.

Exercises and review questions


Last modified: 15 Jan 2008