quick question

what is unique about a template class?
closed account (Dy7SLyTq)
it allows you to perform operations on data types. probably the most common is making containers such as vectors, basic_string, lists, (de)queues, maps
It is not piece of code. It is an instruction for the compiler to generate piece of code that has type which was not known at the time when the template was written, yet the code fulfills strong typing requirement.

A class defines a type. A template class describes a potential family of classes without explicitly defining them.
closed account (Dy7SLyTq)
first of all it is code... second of all the whole c++ source file is instructions for the compiler.
Topic archived. No new replies allowed.