I have declared a virtual method in super class. I want to call that method using the super class pointer which is pointing to the sub class object. For example:
class A { virtual void foo(); }
class B : public A { virtual void foo(); }
A *b = new B();