title: How to call Base class method through base class pointer pointing to derived class
body: <pre><code>class Base
  {
    public:
      virtual void foo()
      {}
  };
  
  class Derived: public Base
  {
    public:
      virtual void foo()
      {}
  };
  
  int main()
  {
      Base *pBase = NULL;
      Base objBase;
      Derived objDerived;
  
      pBase = &amp;objDerived;
      pBase-&gt;foo();
  
      /*Here Derived class foo will be called, but i want this to call 
      a base class foo. Is there any way for this to happen? i.e. through 
      casting or something? */
  }
  </code></pre>