quick question

Apr 9, 2013 at 9:08pm
what is unique about a template class?
Apr 9, 2013 at 9:19pm
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
Apr 9, 2013 at 9:46pm
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.
Apr 9, 2013 at 10:03pm
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.