There is some error

#include
using namespace std;
void ratinamaze(char maze[][1001],int sr,int sc,int er,int ec,int sol[][1001]){
if(sr==er and sc==ec){
sol[er][ec]=1;
for(int i=0;i<=er;i++){
for(int j=0;j<=ec;j++){
cout<<sol[i][j]<<" “;
}
cout<<”\n";
}
return;
}
if(sr>er or sc>ec ){
return;

}
if( maze[sr][sc]=='X'){
    return;
}
sol[sr][sc]=1;
ratinamaze(maze,sr,sc+1,er,ec,sol);
ratinamaze(maze,sr+1,sc,er,ec,sol);
sol[sr][sc]=0;
return;

}
int main()
{
int n,m;
cin>>n>>m;
int sol[1001][1001]={0};
char maze[1001][1001];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>maze[i][j];
}
}

ratinamaze(maze,0,0,n-1,m-1,sol);

return 0;

}

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.