title: object of abstract class type "QuarterBack" is not allowed
body: <p>I have an abstract base class called Player, and it has a subclass called QuarterBack. If I try to instantiate an object of QuarterBack, then I receive 2 errors stating: a) object of abstract class type "QuarterBack" is not allowed: b)'QuarterBack': cannot instantiate abstract class</p>
  
  <p>There are two pure virtual functions in Player called getPlayerPosition() and play(). However, I am only getting an error for getPlayerPosition() Quarter back is supposed to be the concrete subclass to Player, but the compiler says that QuarterBack is still an abstract class.</p>
  
  <p>I don't know where to start fixing these errors.</p>
  
  <pre><code>class Player {
  private: 
  string fname, lname, position;
  int playerID;
  static int numPlayers;
  public:
  Player(string fname, string lname, string position, int playerID) {
      this-&gt;fname = fname;
      this-&gt;lname = lname;
      this-&gt;position = position;
      this-&gt;playerID = playerID;
      ++numPlayers;
      cout &lt;&lt; "Creating Player" &lt;&lt; endl;
  }
  ~Player() {
      cout &lt;&lt; "Destroying Player" &lt;&lt; endl;
  }
  
  string getName() {
      return fname + " " + lname;
  }
  
  virtual string getPlayerPosistion() = 0; // pure virtual function
  
  virtual int play() = 0; // pure virtual function
  
  string toString() {
      string temp = "Name: " + fname + " " + lname + " | Position: " + position + " | Number: " + to_string(playerID);
      return temp;
  }
  };
  
  
  class QuarterBack : public Player {
  private:
  string fname, lname, position;
  int playerID;
  public:
  QuarterBack(string fname, string lname, string position, int playerID) : Player(fname, lname, position, playerID) {
      this-&gt;fname = fname;
      this-&gt;lname = lname;
      this-&gt;position = position;
      this-&gt;playerID = playerID;
      cout &lt;&lt; "Creating QuarterBack " &lt;&lt; endl;
  
  }
  ~QuarterBack() {
      cout &lt;&lt; "Destroying QuarterBack" &lt;&lt; endl;
  }
  
  string getName() {
      return fname + " " + lname;
  }
  
  string getPlayerPosition() {
      return position;
  }
  
  int play() {
      return 0;
  }
  };
  
  int main()
  {
  string firstN, lastN, position;
  int ID;
  firstN = "Tom";
  lastN = "Johnson";
  position = "QuarterBack";
  ID = 17;
  QuarterBack qb(firstN, lastN, position, ID);
  cout &lt;&lt; qb.toString() &lt;&lt; endl;
  
  system("pause");
  return 0;
  }
  </code></pre>