I have a function that returns a base class pointer as in:
baseClass<T>* FunctionA( );
As you can see the baseClass is templated. FunctionA is found in a
third templated class.
What I'm trying to do is on the other side of things "catch" the
returned value as the derived class. My call looks liked this:
object->derivedPointer = FunctionA( );
The derived class is also templated with <typename T>
I've tried using the following casts with no luck:
static_cast<basePtr>(object->derivedPtr) = FunctionA( );
dynamic_cast<basePtr>(object->derivedPtr) = FunctionA( );
(basePtr)(object->derivedPtr) = FunctionA( );
I'm using .Net 2003
Any help or an online referenc to look at would be appreciated.