I have a peculiar requirement and not been able to find a solution.
class Base
{
public:
void func()
{
//access the member say 'var' of derived class
}
}
- It is mandatory in our case that all derived class from base will have member 'var'.
- Name of the derived class can be anything.