Constructors are not inherited. You will have to declare a Dwarf
constructor that matches your definition.
I think you'll also have trouble with this:
string race = "Dwarf";
You can't initialize class members that way. It will have to be initialized in a constructor.
Edit:
You don't seem to understand what I mean by a declaration. Change your Dwarf
class declaration to look something like this:
// Dwarf: High health, Low attack, High defense
class Dwarf: public Poke {
public:
string race;
Dwarf(int health, int damage, int shield); // <-- constructor declaration
int attack(Poke*);
int defend(Poke*);
int getHealth();
};
Edit 2:
Your Dwarf
constructor should also call the Poke
constructor, like so:
Dwarf::Dwarf(int health, int damage, int shield) :
Poke(health, damage, shield),
race("Dwarf")
{
// Nothing needed here.
};