I've been working on my text adventure, and in storing all the rooms I've come across a problem. How to store them. I want to keep them all in a vector, so they can be accessed easily, but when I do, I get an error.
The error given is:Code:#ifndef ROOM_LIST //Prevents repeat definitions. #define ROOM_LIST #include "Room.h" #include <vector> const unsigned short int roomCount=2; std::vector<Room> roomList; Room test1("coc_testhall", "You are standing in a large, open room. Doors line every wall, with barely a foot between them."); roomList.push_back(test1); Room test2("coc_armorroom", "You are standing in a square room, lined with tables; each holding multiple suits of similar armor."); roomList.push_back(test2); #endif
Thank you for your time,Originally Posted by Dev-CPP Error