title: Inaccessible public member variable of base class
body: <p>As the title says, i can't access the public member variable of the base class from my main file.</p>
  
  <blockquote>
    <p>Entity.h:14:10: error: 'char Entity::character' is inaccessible</p>
  </blockquote>
  
  <p>entity.h:</p>
  
  <pre><code>#include "Vector2.h"
  #include &lt;Windows.h&gt;
  
  class Entity {
  public:
      Entity(char character, WORD color, Vector2&lt;int&gt; pos);
  
      Vector2&lt;int&gt; pos;
      Vector2&lt;int&gt; vel;
  
      char character;
      WORD color;
  };
  </code></pre>
  
  <p>player.h:</p>
  
  <pre><code>#include "Entity.h"
  
  class Player : Entity {
  public:
      Player(int lives, char character, WORD color, Vector2&lt;int&gt; pos);
  
      int lives;
      int points;
  };
  </code></pre>
  
  <p>Constructor call in main:</p>
  
  <pre><code>int main(){
      Player player(0, 'C', FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY, playerSpawn);
      char c = player.character; // error here
      return 0;
  }
  </code></pre>
  
  <p>Any suggestions?</p>