I have one base class and two classes derived from it. I have several virtual functions in the base class so I create a pointer to the base class and use this pointer to access these methods.
Now I want to access member variable of derived class (this variable is not present in the base class) using the pointer to base class which points to a derived class object.
Can this be done? Should this be done?