Inheritance help

Hi, I am having trouble understanding inheritance. How do I get class monster to inherit the functions from class Actor. It doesn't let me. It gives a inheritance member not allowed.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 #ifndef _MONSTER_
#define _MONSTER_


#include "Room.h"
class Actor 
{
        private:
        Room* room;
	public:
	


	Actor();

	void setRoom(Room* newRoom);

	void printStatus();

	Room* getRoom();

	void takeATurn();

};

class Monster : public Actor
{
private:
        Room* room;

public:
	Monster();

	

	

};

#endif 
seeing i don't have your Room class i swapped that class for a std::string and it compiles just fine, so i'm guessing the issue is with code you haven't posted (i.e. your Room class).
which class did you swap out? Thanks.
seeing i don't have your Room class i swapped that class
Topic archived. No new replies allowed.