When one class inherits from another, the object of the derived class has contained within it an object of the base class. In order for the inheritance to work with templates, you have to provide a template argument for the compiler to use when generating the base object.
Thus the need to write it as:
template <typename T> class Derived : public Base<T>
The "" is the template argument for the Base template.
Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393
Sorry about taking so long to reply, but I made the recommended changes and its all working great so far. Thanks.
Not a big deal. It happens more often than not.
Glad you got it sorted out.
Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393