I'm trying to make a game, and i've created a class for the Player. The class inherits "Entity", which inherits QGraphicsItem.
#ifndef PLAYER_H
#define PLAYER_H
#include "entity.h"
class Player : public Entity
{
public:
Player( QString, int, int, int position );
QRectF boundingRect() const;
void paint( QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget );
void move_north();
void move_south();
void move_west();
void move_east();
void start_moving();
void stop_moving();
void switch_step();
bool its_moving();
void change_pos(int);
private:
QPoint position;
bool is_moving;
private signals:
void Move();
};
#endif // PLAYER_H
But i keep getting the error "expected ':' before 'protected'", at line 33.