wrote:
> I am trying to figure out if this will work. I have a template base
> class
Actually, it sounds like you have a class template you want to use as
a base for something.
> that I want to be able to inherit from, the classes that will
> need to inherit from this also need to be tamplates. Is this possible
> or do i need to think of another way to do it?
You need to get one thing straight: you can inherit only from a class.
You cannot inherit from a template. Even when you define another class
template like so:
template<class T> class Derived : public Base<T> { ...
at the time of instantiating the 'Derived' class with a particular 'T',
say, 'Blah', it will *inherit* from a "normal" *class* (in that case
'Base<Blah>'). IOW, no inheriting from templates exists in C++. In
order to make 'Derived' a normal class (and not a template), you _have_
to derive it from an instantiation of the 'Base' template, like so
class SomeDerived : public Base<Foo> { ...
Please ask more specific questions if something's still unclear.
V
--
Please remove capital As from my address when replying by mail