Hey there, i have an assignment due tomorrow and i'd appreciate it if someone could please explain certain things to me. I started this assignment pretty late only because i've been feeling poorly. Anyways, i'm supposed to make a graph with nodes(rooms) and link them all together where the player or user moves N, E, S or West and the first problem i have now is creating the nodes or rooms. It keeps giving me an error message in my compiler. i'm sure im doing certain things wrong. this is just the header file. Anyone offer to help please!!!
#ifndef MAZE_H
#define MAZE_H
#include <string>
using namespace std;
class Room
{
private:
string* roomName; // room's name
room* next; // link to next room
public:
Room(); // no argument constructor
Room(string name);
void setNext(Room* nextRoom);
Room* getNext();
string* getName();
};
class RoomList
{
private:
Room *start, *end;
public:
RoomList();
void addFirstRoom(string name);
void addLastRoom(string name);
void listAllRooms();
/*Creating New Rooms(Nodes)*/
Room*A = new Room();
Room*B = new Room();
Room*C = new Room();
Room*D = new Room();
Room*E = new Room();
Room*F = new Room();
Room*G = new Room();
Room*H = new Room();
Room*I = new Room();
Room*J = new Room();
Room*K = new Room();
Room*L = new Room();
};
#endif