title: I'm messing up my inheritance
body: <p>So I've got a Piece class supposed to represent pieces on a board, from which I plan to have two other classes inheriting.  I've gotten a lot of problems in doing so, however; here is the relevant code so far.</p>
  
  <pre><code>///
  /// PIECE CLASS HERE
  /// this is an abstract class from which Barrier and Pawn inherit.
  
  class Piece
  {
  public:
      Piece(Space* start);
      sf::Shape m_Circle;
  protected:
      int m_X;
      int m_Y;
      int m_radius;
      Space* CurrentSpace;
  };
  
  Piece::Piece(Space* start):
      m_X(start-&gt;GetX()),
      m_Y(start-&gt;GetY()),
      m_radius(14),
      CurrentSpace(start)
  {}
  
  ///
  /// BARRIER CLASS HERE
  /// these are the white stones that block a player's path
  
  class Barrier : public Piece
  {
  public:
      Barrier(Space* initial);
      void Move(Space* target, bool isCapturing);
  };
  
  Barrier::Barrier(Space* initial)
  {
      Piece(initial);
      m_Circle = sf::Shape::Circle((float)m_X, (float)m_Y, (float)m_radius, sf::Color(255, 255, 255));
      Move(initial);
  }
  
  void Barrier::Move(Space* target, bool isCapturing)
  {
      int xChange = abs(target-&gt;GetX() - m_X);
      int yChange = abs(target-&gt;GetY() - m_Y);
      m_Circle.Move((float)xChange, (float)yChange);
      CurrentSpace.ToggleOccupied();
      if(!isCapturing)
      {
          (*target).ToggleOccupied();
      }
      CurrentSpace = target;
  }
  </code></pre>
  
  <p>I'm getting loads of errors I don't understand, in particular:</p>
  
  <pre><code>no matching function for call to Piece::Piece()
  declaration of 'Piece initial' shadows a parameter
  no matching function for call to 'Barrier::Move(Piece&amp;)'
  request for member 'ToggleOccupied' in '((Barrier*)this)-&gt;Barrier::&lt;anonymous&gt;.Piece::CurrentSpace', which is of non-class type 'Space*'|
  </code></pre>
  
  <p>Being new to C++, I don't understand what's going wrong with any of this.  I tried to build my code analogous to the code I found in the book I used to learn C++, but apparently I've overlooked some subtlety.  All the functions that I try to call seem to exist in the appropriate places, and I define them with the same values as in their prototype, I think.</p>