Object.hpp
Code:
#ifndef OBJECT_HPP
#define OBJECT_HPP
#include<SFML/System.hpp>
#include<SFML/Window.hpp>
#include<SFML/Graphics.hpp>
#include"MainResources.hpp"
class Object : public sf::Sprite{
private:[INDENT]float Temperature;
float Contamination;
sf::Vector2f Size;
sf::IntRect Area;
[/INDENT]public:[INDENT]void SetTemperature(float Temperature);
void SetContamination(float Contamination);
void SetSize(sf::Vector2f Size);
float *GetTemperature();
float *GetContamination();
sf::Vector2f *GetSize();
void ComputeScale();
void ComputeArea();
sf::IntRect *GetArea();
[/INDENT]};
#endif // OBJECT_HPP
Person.hpp
Code:
#ifndef PERSON_HPP
#define PERSON_HPP
#include<SFML/System.hpp>
#include<SFML/Window.hpp>
#include<SFML/Graphics.hpp>
#include"Object.hpp"
class Person : public Object{
private:[INDENT]int Health;
int Stamina;
int Magicka;
sf::View Sight;
sf::IntRect SightArea;
[/INDENT]public:[INDENT]void SetHealth(int Health);
void SetStamina(int Stamina);
void SetMagicka(int Magicka);
int *GetHealth();
int *GetStamina();
int *GetMagicka();
[/INDENT]};
#endif // PERSON_HPP
"Person.hpp:8: Fehler:expected class-name before '{' token"
Letztendlich konnte die Klasse "Object" ja auch von "sf::Sprite" erben.
Ich weiß einfach nicht was ich falsch gemacht habe.
Danke im Voraus für die Hilfe







