template <class T>
before the class definition.
Class-name
becomes Class-name<T>
in all places except:
Class-name<Type> Variable;
Vector<int> vi(2, 123);
Vector<double> vd(3, 4.56);
Vector<Rational> vr(5, Rational(2, 3));
Point
template class -
point.h
(original),
point.h
(copy) ,
PointTest.cpp
.
This page was last modified on Feb 11, 2001
URL: http://people.hsc.edu/faculty-staff/robbk/Coms262/Lectures/TemplateClasses.html