Object of abstract class type is not allowed : <p>I am trying to define an inheritance system where a base class, named Animal, has virtual functions that can inforce some functionalities to the derived classes. The derived classes are species of animals, ie. Cow, Dog, Cat.</p>

<p>Overview of classes of my interface:</p>

<pre><code>class Animal
{
public:
   virtual void walk() = 0;
   virtual void fly() = 0;
   virtual void jump() = 0;
}

class Cow : public Animal
{
public:
   void walk();
}

void Cow::walk()
{
   //do something specific for cow
}
</code></pre>

<p>I would like to save ten different species dynamically to an array of size ten. This is what I have come up with:</p>

<pre><code>const int SIZE = 10;
Animal** myArray = new Animal*[SIZE];
myArray[0] = new Cow();
</code></pre>

<p>I get this error message: "Object of abstract class type "Cow" is not allowed". I believe this is because of the implementation of pure virtual functions in the base class. </p>
