title: "Call to implicitly deleted default constructor of "error
body: <p>I keep getting three errors that all relate to "Call to implicitly deleted default constructor of ____. Would anyone happen to know why this is?</p>
  
  <p>/Users/vivekreddy/Desktop/Vivek/School/Spring 2016/CS32/project 3/project 3/Player.cpp:114:18: Call to implicitly-deleted default constructor of 'BadPlayerImpl'</p>
  
  <pre><code>#include "provided.h"
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  
  
  class HumanPlayerImpl:public Player
  {
    public:
      virtual bool isInteractive() const { return true;};
      int chooseMove(const Scaffold&amp; s, int N, int color);
  
  };
  
  class BadPlayerImpl: public Player
  {
    public:
      int chooseMove(const Scaffold&amp; s, int N, int color);
  };
  
  class SmartPlayerImpl: public Player
  {
    public:
      virtual bool isInteractive() const { return true;};
      int chooseMove(const Scaffold&amp; s, int N, int color);
  };
  
  
  
  
  //implementations
  
  
  //put virtual in front of implementations only or declarations here as well?
  
  
  int HumanPlayerImpl::chooseMove(const Scaffold&amp; s, int N, int color)  //goal is to get N in a row, return the column necessary to put the checker so we could do that.  otherwise return -1.  can make the column be arbitrary
  {
      //algorithm is inputting N so maybe don't need this check?
      if (N&gt;s.cols()||N&lt;=0) {
          cout&lt;&lt;"Enter a number within the valid range of columns you specified";
          return -1;
      }
  
      if(s.numberEmpty()==0)
      {
          return -1;
      }
  
      int columnnum;
      while (columnnum&lt;=s.cols()||columnnum&lt;=0) {
          cout&lt;&lt;"Enter column number of your move";
          cin&gt;&gt;columnnum;
          if (columnnum&lt;=s.cols()) {
              return columnnum;
          }
          cout&lt;&lt;"Column number not valid ";
      }
      return -1; //OK?
  }
  
  int BadPlayerImpl::chooseMove(const Scaffold&amp; s, int N, int color)
  {
      if ((N&gt;=s.cols()&amp;&amp;N&gt;=s.levels())||N&lt;=0) { //make sure this works
          cout&lt;&lt;"Enter a number within the valid range of columns you specified";
          return -1;
      }
      for (int j=0; j&lt;s.cols();j++) {
          if (s.checkerAt(j,0)==VACANT) { 
              return j;
          }
      }
      return -1; //see if this OK
  }
  
  int SmartPlayerImpl::chooseMove(const Scaffold&amp; s, int N, int color)
  {
      return -1;  //  This is not always correct; it's just here to compile
  }
  
  //******************** Player derived class functions *************************
  
  // These functions simply delegate to the Impl classes' functions.
  // You probably don't want to change any of this code.
  
  HumanPlayer::HumanPlayer(string nm)
   : Player(nm)
  {
      m_impl = new HumanPlayerImpl;  //error is here
  }
  
  HumanPlayer::~HumanPlayer()
  {
      delete m_impl;
  }
  
  int HumanPlayer::chooseMove(const Scaffold&amp; s, int N, int color)
  {
      return m_impl-&gt;chooseMove(s, N, color);
  }
  
  BadPlayer::BadPlayer(string nm)
   : Player(nm)
  {
      m_impl = new BadPlayerImpl;  //error is here 
  }
  
  BadPlayer::~BadPlayer()
  {
      delete m_impl;
  }
  
  int BadPlayer::chooseMove(const Scaffold&amp; s, int N, int color)
  {
      return m_impl-&gt;chooseMove(s, N, color);
  }
  
  SmartPlayer::SmartPlayer(string nm)
   : Player(nm)
  {
      m_impl = new SmartPlayerImpl;  //error is here 
  }
  
  SmartPlayer::~SmartPlayer()
  {
      delete m_impl;
  }
  
  int SmartPlayer::chooseMove(const Scaffold&amp; s, int N, int color)
  {
      return m_impl-&gt;chooseMove(s, N, color);
  }
  </code></pre>
  
  <p>Below is my declaration of the class Player which is the base class:</p>
  
  <pre><code>class Player
  {
    public:
      Player(std::string nm) : m_name(nm) {}
      virtual ~Player() {};
      std::string name() const { return m_name; };
      virtual bool isInteractive() const { return false; }
      virtual int chooseMove(const Scaffold&amp; s, int N, int color) = 0;
        // We prevent any kind of Player object from being copied or assigned by
        // making the copy constructor and assignment operator unavailable in
        // the base class (and thus in any derived class).
      Player(const Player&amp; other) = delete;
      Player&amp; operator=(const Player&amp; other) = delete;
    private:
      std::string m_name;
  };
  </code></pre>