I have a class that inherits from sf::Sprite called AnimSprite.
Now, I'm trying to make a player class that inherits from AnimSprite.
Everything works fine until I try to add a constructor to PlayerClass. Right now the constructor is exactly the same as the (working) AnimSprite constructor.
PlayerClass::PlayerClass(std::string ImagePath) {
if (!MyImage.LoadFromFile(ImagePath)) throw(-1);
SetImage(MyImage);
}
This is the Error
In constructor `PlayerClass::PlayerClass(std::string)':
error: no matching function for call to `AnimSprite::AnimSprite()'
note: candidates are: AnimSprite::AnimSprite(const AnimSprite&)
note: AnimSprite::AnimSprite(std::string)
|=== Build finished: 1 errors, 0 warnings ===|