You must declare a template before you can use it. A declaration, as in the following example, provides enough information to use the template, but not enough information to implement the template.
template <class Number> Number twice( Number original ); |
In this example, Number is a template parameter; it specifies the range of functions that the template describes. More specifically, Number is a template type parameter, and its use within the template definition stands for a type determined at the location where the template is used.