template <class T> class Number { ... .. ... // Function prototype T getnum(); }; // Function definition template <class T> T Number<T>::getNum() { return num; }