Help using templates.

This is the IDE's fault, add the function prototype above the definition:

template<class TYPE> TYPE Add(TYPE n1, TYPE n2);

The IDE otherwise generates a prototype as:

TYPE Add(TYPE n1, TYPE n2);

leaving TYPE as undefined.