I put a randomizer in the code to randomly go through the moves to give a sense of automation... but it is definitely a poor way to do it, that part could definitely use some work... but I think I've grown bored with it... so I will see what other people come up with.
Just to give you a few hints... make a struct to hold maze multi-dimensional array, location of mouse and cheese, etc. Here are some of my function declarations, this should give you an idea of whay you may need.:
void ReadMaze (string mazeFile);
void WriteMaze (string mazeFile, maze m);
void FindRatAndCheese(string a[MAX][MAX]);
void DisplayMaze (string a[MAX][MAX], int r, int c);
void PopulateMaze(string a[MAX][MAX], int r, int c);
int MoveMouse (string direction);
int RandomRange(int lowest_number, int highest_number);
void CopyArray(string source[MAX][MAX], string dest[MAX][MAX]);
void PlayHuman (void);
void PlayComputer (void);