Doubt in code- code showing error

#include
using namespace std;

bool ratinmaze(char maze[][10],int soln[][10],int i, int j, int n, int m)
{
if(i==n && j==m)
{
soln[n][m]=1;
return true;
}
if(i>n || j>m)
return false;
if(maze[i][j]==‘X’)
return false;
soln[i][j]=1;
bool rightsuccess=ratinmaze(maze,soln,i,j+1,n,m);
bool downsuccess=ratinmaze(maze,soln,i+1,j,n,m);
soln[i][j]=0;
if(rightsuccess || downsuccess)
return true;
return false;
}

int main()
{
int n,m,i,j;
cin>>n>>m;
char maze[n][m];
int soln[n][m];
for(i=0;i<n;++i)
for(j=0;j<m;++j)
cin>>maze[i][j];
bool t;
t=ratinmaze(maze,soln,0,0,n,m);
if(t==1)
{
for(i=0;i<n;++i)
{
for(j=0;j<m;++j)
cout<<soln[i][j]<<" “;
cout<<endl;
}
}
else
cout<<”-1";
return 0;
}

My code is showing an error

@vanshika1205 hey vanshika please share your code through cb.lk/ide.

@vanshika1205 here our aim is to find rightmost path so as soon as we reach end, we need to keep track that we have reached our final state and we need not explore further, also we need to make sol zero only we have no move from that point. I have made some changes in the code have a look.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.