I have the code as below. I have a abstract template class Foo and two subclasses (Foo1 and Foo2) which derive from instantiations of the template. I wish to use pointers in
Easiest way is to make your interface templated.
template class IFoo { public: virtual void functionA()=0; virtual void functionB(T arg){ do something; }; }; template class Foo : public IFoo{ public: void functionA(){ do something; }; void functionB(T arg){ do something; }; };