Double-check your book/tutorial on templates. It should have mentioned that template declaration and definition must all be in the same code file. Meaning: You cannot split the template in two files. Meaning: Write the whole thing in List.h.
"Within the class declaration, the word Array may be used without further qualification. Elsewhere in the program, this class will be referred to as Array<T>. For example, if you do not write the constructor within the class declaration, you must write
1 2 3 4 5 6 7 8
template <class T>
Array<T>::Array(int size):
itsSize = size
{
pType = new T[size];
for (int i = 0; i<size; i++)
pType[i] = 0;
}
The declaration on the first line of this code fragment is required to identify the type (class T). The template name is Array<T>, and the function name is Array(int size)."
What I understand of the bold text is that you can write the constructor outside the class definition, e.g. in a .cpp file. Right?