0

I keep this error and i don't know why, right now I have base class Runner which has one virtual function which is overriden in a derived class ghost my code is below
Runner.h

#ifndef RUNNER_H_
#define RUNNER_H_

#include "Maze.h"
#include <QtGui>

class Runner{
public:
	Runner(QColor c);
	int runnerSize;
	void setLocation(int,int);
	void setMaze(Maze);
	virtual void redraw(QPainter * painter) = 0;
	virtual ~Runner();

protected:
	int rXcoor;
	int rycoor;
	Maze * rMazePanel;
	QColor rColor;
private:


};

#endif /*RUNNER_H_*/

Ghost.h

#ifndef GHOST_H_
#define GHOST_H_

#include <QtGui>
#include "Runner.h"

class Ghost: public Runner{
public:
	Ghost(QColor c);
	~Ghost();
	int tryMove();
	void move();
	
	void redraw(QPainter * painter);
protected:
private:
	int direction;
};

#endif /*GHOST_H_*/

when i compile this I get this error:
Ghost.h:7: error: expected class-name before ‘{’ token

I really can't see why this happening

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by cikara21
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.