I am a complete beginner and I have read a variety of posts on the forum regarding this subject, yet I am still unsure of where I am going wrong.
This is my base class:
class room {
    protected:
        int doors;
        string name;
        room *north;
        room *east;
        room *south;
        room *west;
    public:
        room(int numDoors, string rmName);
        virtual string getName();
        virtual void setRoom(int numDoors, string rmName);
        void setConnect(room *room1, room *room2, room *room3, room *room4);
};
room::room(int numDoors, string rmName) : doors(numDoors), name(rmName) {}
string room::getName() {
    return this->name;
}
void room::setConnect(room *room1, room *room2, room *room3, room *room4) {
    this->north = room1;
    this->east = room2;
    this->south = room3;
    this->west = room4;
    return;
}
And this is my derived class:
class treasureRoom : public room {
    protected:
        string chest[5];
    public:
        treasureRoom() : base(4, "The Mad King's Hoard") {}
        void setChest(string &loot1, string &loot2, string &loot3, string &loot4, string &loot5);
        string getChest(int i);
};
void treasureRoom::setChest(string &loot1, string &loot2, string &loot3, string &loot4, string &loot5) {
    this->chest[0] = loot1;
    this->chest[1] = loot2;
    this->chest[2] = loot3;
    this->chest[3] = loot4;
    this->chest[4] = loot5;
    return;
}
string treasureRoom::getChest(int i) {
    return this->chest[i];
}
I have attempted several times to implement solutions talked about on the forums regarding this type of error, but I am still missing something of key importance. Any help would be appreciated!
 
     
    