title: Error message: Object of abstract class type "X" is not allowed: Pure virtual "Y" has no overrider
body: <p>Enemy.h</p>
  
  <pre><code>class Enemy
  {
      int hp;
  public:
      Enemy(int);
      void setHP(int);
      int getHP();
      virtual int attack() = 0;
  };
  </code></pre>
  
  <p>Enemy.cpp</p>
  
  <pre><code>Enemy::Enemy(int playerXP)
  {
      if (playerXP == 0) {
          hp = rand() % 5 + 1;
      }
      else if (playerXP &gt; 0) {
          hp = rand() % (playerXP * 5) + 1;
      }
  }
  
  void Enemy::setHP(int currentHP)
  {
      hp = currentHP;
  }
  
  int Enemy::getHP()
  {
      return hp;
  }
  </code></pre>
  
  <p>Reaper.h</p>
  
  <pre><code>#pragma once
  #include "Enemy.h"
  
  class Reaper : public Enemy
  {
  public:
      Reaper(int playerXP) : Enemy(playerXP)
      {   
      }
  
      int attack(int, int);
  };
  </code></pre>
  
  <p>Reaper.cpp</p>
  
  <pre><code>int Reaper::attack(int pa, int php)
  {
      int eatk = 0;
      if (pa == 0) {
          eatk = php * .5;
      }
      else {
          eatk = rand() % php * .25;
      }
      return eatk;
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Object of abstract class type "Reaper" is not allowed: 
    Pure virtual function "Enemy:attack" has no overrider.</p>
  </blockquote>
  
  <p>My question is.. Why am I getting this error?  I'm trying to understand why I am getting this, and also any possible answers to solve it.</p>