I have an abstract class defined as follows:
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;
};
I'm trying to inherit from it into another class defined as follows:
class ScreenLayer explicit : public AnimatedDraw
{
public:
ScreenLayer(void);
virtual void Draw(sf::RenderWindow &window) override; //I'll need to be able to override these again in subclasses
virtual void Draw(sf::RenderWindow &window, sf::Shader &shader) override;
virtual void Update(sf::Clock &clock) override;
~ScreenLayer(void);
};
The source file is empty functions right now and 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)
{
}
I'm doing something wrong, as my compiler (VC2010) produces several errors, including complaining it can't find ScreenLayer
in the ScreenLayer.cpp
file, and several about this line class ScreenLayer explicit : public AnimatedDraw
I haven't tried to use explicit overrides before, but according to the C++0x article on wikipedia, that is how you do it. Does VC2010 not support explicit overrides, or did i mess something else up?
Thanks in advance