The implementation of templated code MUST be within (or included within) the header file.
P.S. Sorry for the code reconfiguration; I prefer that the public section (i.e. the section I am "advertising") go first; then the protected section, followed by the private section.Code:// header.h #pragma once template <class T> class base { public: T getData() const { return data; } protected: T data; };




Reply With Quote