CS 102 Lecture Notes
Week Eight, Thursday: Templates (continued)
Template Classes
Template <class Item>
class Bag
{
. . .
};
Creating a template class imposes some additional requirements and complexity on the
programmer and member function implementations must be included in the
class header file. The good news is that template functions are generally necessary
only for utility container classes (and many of these are already provided in
standard libraries). The bad news is that the student will still need to know
how to implement template classes for the exams.
This page established October 1, 1999; last updated October 1, 1999.