I am getting the error "Room" does not name a type "Room* method name" but I have included the needed header files
I am also getting error Room has not been declared Door(bool param1, Room* param2)
lines 50 and 44 in the below image of the build
Image of Build Log showing the error
I have tried changing the order of the header file include calls but that has not fixed the problem. Sorry if this is a duplicate, I could not find an answer from any similar posts. Door.h
#ifndef DOOR_H_INCLUDED
#define DOOR_H_INCLUDED
#include "IInteractable.h"
#include "Room.h"
using namespace std;
/**
* this class will be used to handel two cases, moving the player to another
* room and to stop them from moving forward before they complete some task.
* if isLocked is true the player will need to use one of their keys to open it
*/
class Door : public IInteractable {
public:
/**
* sets isLocked and nextRoom
*/
Door(bool _isLocked, Room* _nextRoom);
~Door();
/**
* move the player to the nextRoom if the door in not locked, otherwise print
* a message to the console.
*/
void interact();
/**
* sets isLocked to false
* @return always true
*/
bool unlock();
/**
* @return the nextRoom
*/
Room* getNextRoom();
/**
* @return isLocked
*/
bool getIsLocked();
private:
bool isLocked;
Room* nextRoom;
/**
* move the player to the nextRoom
*/
void movePlayer();
};
#endif //DOOR_H_INCLUDED
Door.cpp
#include "Door.h"
Door::Door(bool _isLocked, Room* _nextRoom) {
}
Door::~Door() {
}
void Door::interact() {
}
bool Door::unlock() {
}
Room* Door::getNextRoom() {
}
bool Door::getIsLocked() {
}
void Door::movePlayer() {
}