title: Class inheritance: Function is inaccessible
body: <p>I'm getting this error, but I thought I would only get it if the member's protection level was too high and made it inaccessible, but I'm getting it anyway. </p>
  
  <p>Shopable.h:</p>
  
  <pre><code>#ifndef _SHOPABLE_H_
  #define _SHOPABLE_H_
  
  #include "Library.h"
  
  class Shopable{
  private:
      std::string Name;
      int Cost;
      std::string Description;
  public:
      std::string getName() const{return Name;}
      int getCost() const {return Cost;}
      virtual std::string getDesc() const = 0;
  };
  
  #endif
  </code></pre>
  
  <p>Weapon.h:</p>
  
  <pre><code>#ifndef _WEAPON_H_
  #define _WEAPON_H_
  
  #include "Globals.h"
  #include "Shopable.h"
  
  class Weapon : Shopable{
  private:
      int Damage;
  public:
      Weapon(int Cost,int Damage,std::string Name) : Cost(Cost), Damage(Damage), Name(Name){}
      std::string getDesc() const{
          return getName()+"\t"+tostring(Damage)+"\t"+tostring(Cost);
      }
      int Damage(Entity *target){
          int DamageDealt = 0;
          //do damage algorithm things here
          Special();
          return DamageDealt;
      }
  };
  
  #endif
  </code></pre>
  
  <p>Some line in a random function with the correct includes:</p>
  
  <pre><code>std::map&lt; std::string, Weapon* &gt; weapons;
  Weapon* none = new Weapon(0,0,"None");
  weapons[none-&gt;getName()] = none;
  </code></pre>
  
  <p>The error is with getName() - "Error: function 'Shopable::getName' is inaccessible"</p>