using inheritence and generic in c++ ,this problem appeared to me: this is my abstract base class
template<class Type>
struct A
{
Type info;
};
template<class Type>
class base
{
protected:
A<Type>* ptrA;
public:
virtual void func(Type X) = 0;
void func(Type X)
{
ptrA->info = x; //no Errors occured
}
};
and this is the derived
template<class Type>
class derived : class base<Type>
{
public:
void func(Type X)
{
ptrA-> info = x ; // this is the problem
}
};
the problem appeared to me at the function definition of the derived class : that i cannot access the member that ptrA refrenced ,,, any help ,please