How to make a base class object call a derived class non virtual function?
<p>I have a base class with pure virtual functions and I have a derived class with definitions for the base class virtual functions as well as its own functions.</p>

<p>Now I have pointed the base class object to derive class, like:</p>

<pre><code>Base *bc =new Child();
</code></pre>

<p>I want to call the child class method (not defined or declared in the parent) using this object.</p>

<p>But I am getting compiler error <code>memeberFunction not define in Base class</code>.</p>

<p>The code is as:</p>

<pre><code>class Base
{
public:
  virtual void method1() = 0;
};

class child : public Base
{
public:
  virtual void method1() {}
  void Method2() { /* some implementation */ }
};
</code></pre>

<p>How can I achieve this?</p>

<pre><code>bc-&gt;Method2();
</code></pre>
