C ++ Why is my class still abstract?

I am sure that for my part this is something simple, but I can not understand why my compiler believes that one of my classes is abstract. Here's the situation:

I have a base base class:

class AnimatedDraw
{
public:
    virtual void Draw(sf::RenderWindow &window) = 0;
    virtual void Draw(sf::RenderWindow &window, sf::Shader shader) = 0;
    virtual void Update(sf::Clock &time) = 0;
};

And I inherit it like this:

class ScreenLayer : public AnimatedDraw
{
public:
    ScreenLayer(void);

    virtual void Draw(sf::RenderWindow &window);

    virtual void Draw(sf::RenderWindow &window, sf::Shader &shader);

    virtual void Update(sf::Clock &clock);

    ~ScreenLayer(void);
};

for reference, the ScreenLayer.cpp file is as follows:

#include "ScreenLayer.h"
ScreenLayer::ScreenLayer(void)
{
}
void ScreenLayer::Draw(sf::RenderWindow &window)
{
}
void ScreenLayer::Draw(sf::RenderWindow &window, sf::Shader &shader)
{
}
void ScreenLayer::Update(sf::Clock &clock)
{
}
ScreenLayer::~ScreenLayer(void)
{
}

However, when I try to use my derived class (i.e. AnimatedDraw *testDrawer = new ScreenLayer;), my compiler complains that ScreenLayer is abstract. Changing an animated link to ScreenLayer was also unacceptable for the same reason. I rewrote the entire abstract function on my base class, right? I'm not sure why this is seen as abstract. Any help would be appreciated

thank

+5
1

sf:: Shader:

virtual void Draw(sf::RenderWindow &window, sf::Shader shader) = 0;

, , .

+21

All Articles