I apologize as I'm coming from the Java world and trying to learn C++ while using SFML as my motivation, so this will probably come across as very novice:
LevelOne.hpp
#ifndef LEVEL_ONE_H
#define LEVEL_ONE_H
#include <SFML/Graphics.hpp>
class LevelOne : public sf::Drawable, public sf::Transformable
{
public:
LevelOne();
~LevelOne();
};
#endif
LevelOne.cpp
#include "LevelOne.hpp"
LevelOne::LevelOne()
{
}
LevelOne::~LevelOne()
{
}
void draw(sf::RenderTarget& target, sf::RenderStates states)
{
sf::VertexArray vertices;
sf::Texture texture;
states.transform *= getTransform();
states.texture = &texture;
target.draw(vertices, states);
}
For getTransform() I get ERROR: identifier "getTransform" is undefined. If I don't use a header file, and just simply have a class declaration then it finds the method.
Thanks for the help.