Lecture 10

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. Write code that uses the following STL algorithms: (i) for_each, (ii) sort, and (iii) reverse.
  3. Look up an STL reference and write code that uses some feature that you are asked to use.
  4. Define and use function classes/objects.

Reading assignment

  1. Section 1.6.4, STL reference, class notes.
  2. Lecture: STL algorithms.
  3. Figures 3.14, 3.15.

Exercises and review questions


Last modified: 20 Sep 2011