CS 112b
Spring 2004
Ileana Streinu

Lecture 6

  1. Recap: struct in C/C++.
  2. Templates in C++. Motivation: sorting other data types, not just integers. Instead of writing several separate functions, write only one "template function" and use it for several types of data.
  3. Preparation for next Homework: Insertion Sort. You will have to implement it both on integers and as a template (tested on integers and characters).