Maze game, inputting into 2d vector

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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  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;
}
any ideas on how to do this?
Topic archived. No new replies allowed.