Ok, quick question. I want to create a base class really just to use in a polymorphic vector, but since there will be generic stuff in there I want there to be a bit of functionality. Now, there's going to be a pointer in there, but depending on the inherited class, the type of pointer could change. I was wondering if it was possible to make the base class a template class, and specify the template when I inherit. If that makes no sense, see below. I would just code it out, but I'm in the middle of planning some other stuff and I don't want to get into coding it if it won't even work.
Does the below make sense?
-
-
template <class T>
-
class CBase
-
{
-
T* m_pointer;
-
CBase();
-
~CBase();
-
}
-
-
class CProcessInfo : CBase<CProcess>
-
{
-
etc...
-
}
-
-