Project 3 Sample Code
These files should be compiled with the following command:
g++ -Wall -ansi -g TemplateInst.cc test-main.cc
Taken as a whole, they demonstrate how to use function objects and
writing templated classes using function objects.
- SortedArray.hh and
SortedArray.cc
- Simple array class which utilizes function objects
- Comparators.hh
- Two sample function objects which are passed to the
SortedArray class
- TemplateInst.cc
- Instantiation file for the templated SortedArray class
- test-main.cc
- Simple driver illustrating how to use function objects
Comments to Hannah (hctang@cs.washington.edu)