Rat in maze problem, output is wrong even code is same as in video

I have written the exact same code as sir taught in video, but I am not getting right answer. all ements of solution array become 0. here is my code
#include
#include
using namespace std;
int sol[100][100]={0};
bool func(char arr[][100], int i, int j, int n, int m){
if( i==n-1 and j==m-1)
{
sol[i-1][j-1]=1;
for(int k=0;k<n;k++)
{
for(int l=0;l<m;l++)
{
cout<<sol[i][j]<<" ";
}
cout<<endl;
}
cout<<endl;
return true;
}
sol[i][j]=1;
if(j+1<m and arr[i][j+1]!=‘x’)
{
bool isitgoodd=func(arr,i, j+1, n, m);
if(isitgoodd==true)
{return true;}
}
if(i+1<n and arr[i+1][j]!=‘x’)
{
bool isitgoodr=func(arr,i+1, j, n, m);
if(isitgoodr==true)
{return true;}
}
sol[i][j]=0;
return false;
}

int main() {
char maze[][100]={
“0000”,
“00xx”,
“0000”,
“xx00”,
};
func(maze,0, 0, 4, 4);

return 0;

}
output i got is
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

hi @akshatg2004_c1794fd8daa25ae6 send the code on ide.codingblocks.com here its not readable

1)copy paste there
2)save (ctrl + s)
3)send the url o the page

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.