void Animation::Animation(float duration) :
m_frames(),
m_duration(duration),
m_playing(true),
m_index(0)
{
}
You've got
void as a return type for the constructor - constructors can't return anything explicitly, even if it's
void, as it wouldn't make any sense.
sf::IntRect& getFrame() const;
...
sf::IntRect& Animation::getFrame() const
{
return m_frames[m_index];
}
You're trying to return a non-const reference in a const-qualified function; I would suggest either making the reference const if you intend for the frame to be const, or dropping the const-qualification off the function if you don't (or provide an overload so you can have both options).
Other than that, everything compiles okay, so I think we'll need more detail to find out what's actually causing your specific error.