I am attempting to create a maze that is imported from a file and then placed into a vector that holds a vector of bools but I am not good yet with vectors. My problem is that I have taken the info from the file but I am unsure of how to then process it into the 2d vector. In the maze any coordinate that has a "+" is a path while anything else (blank space, etc) is a wall. The start and finish locations are Location objects, but i have not coded that yet. Any help would be appreciated, thanks
vector<vector<bool> > mazeSpec;
string buffer; //holds lines while they are read in
int length; //holds length of each line/# of columns
bool path; //test if path or not
Location start, finish;
vector<vector<bool> > mazeSpec;
ifstream mazeFile("maze.txt");
if (!mazeFile)
cout << "Unable to open file";
getline(mazeFile, buffer); // read in first line
cout << buffer << endl; //output first line
length = buffer.length(); //length now set so can be compared
while (!mazeFile.eof()) { // read in maze til eof
getline(mazeFile, buffer);
if (buffer == "*") //set path to true or false
path = true;
else
path = false;
cout << buffer << endl;
}