ok i worked and played a bit with it and after reading the comments i did a lil alteration on my codings
but now i have another problem
Code:
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int y = 1;
int x = 2;
int seekRoad(char [][6], int x, int y);
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";
void runMaze(int, int);
int result = seekRoad(maze, 0, 0);
if (result == -1) {
cout << "No exit!\n";
}
{if( (x<=4 && y<=6 )) {
{if( maze[x][y] == 'E' ) return 0;
{if (maze [x][y+1] =="R" )return 0;
else if (maze [x][y-1] == "R")return 0;
else if (maze [x+1][y] == "R")return 0;
else if (maze [x-1][y] == "R")return 0;
return 0;}}}
}}
i keep getting a ISO C++ forbids comparision between pointer and interger
what does that mean and how do i get rid of it? D: