title: Accessing derived class-only methods using base class object
body: <p>I am new to OO programming and I was wondering how to solve the following question -</p>
  
  <p>I have the following:</p>
  
  <pre><code>class A
  {
      public:
      A() {};
      ~A() {};
  
      virtual functionA() = 0;
  }
  
  class B: public A
  {
      public:
      B() {};
      ~B() {};
  
      functionA();
      functionB();
  }
  </code></pre>
  
  <p>Is there a way to access functionB using an object of the base class A? If no, why is it not possible? If yes, how does one do it? I tried to find this answer on this site but I didn't find anything concrete.</p>