hi everybody i'm new to this msg board
currently i'm working on a task which involves mazing
i have learnt C++ for a month and must say i am not very good at it
well while i was coding, my friend took a look at my codes and told me i have a major mistake and ever since then i've been staring at the script and cant figure it out
can someone help me out here? by the way this is not complete
Code:#include <iostream.h>
using std::cout;
using std::cin;
using std::endl;
int seekRoad(char [4][6], int, int);
int main()
{
char maze[][6] = {{'S', 'R', 'X', 'X', 'X', 'X'},
{'X', 'R', 'X', 'X', 'R', 'E'},
{'X', 'R', 'R', 'X', 'R', 'X'},
{'X', 'X', 'R', 'R', 'R', 'X'}};
cout << "Start X = 0\n";
cout << "Start Y = 0\n\n";
int result = seekRoad(maze, 0, 0);
if (result == -1) {
cout << "No exit!\n";
if (maze [x][y+1] =="R" );
else if (maze [x][y-1] == "R");
else if (maze [x+1][y] == "R");
else if (maze [x-1][y] == "R");
}
return 0;
}