Question: GIVEN --- MAZESOLVER ------------C++ enum direction {SOUTH, EAST}; struct Position { int row; int column; }; private: //PRIVATE DATA MEMBERS: int maze_rows_ = 0; //the
GIVEN --- MAZESOLVER ------------C++
enum direction {SOUTH, EAST};
struct Position { int row; int column; };
private: //PRIVATE DATA MEMBERS: int maze_rows_ = 0; //the number of rows as read file from input file int maze_columns_ = 0; //the number of cplumns as read from input file bool maze_ready = false; //indicates whether the maze has been initialized from input file char** maze_ = nullptr; //a 2-d character array containint maze characters read from input file char** solution_ = nullptr; //a 2-d character array containint maze characters as in maze_ and path to exit marked with '>' characters std::stack
//pre: maze_ has been allocated with the correct number of rows and columns read from input file
//post: fills in maze_ with characters read from input file //called by constructor void fillMaze(std::ifstream& input_stream); // WRITE THIS FUNCTION
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
