Funky chess board logic

I am unable to find the correct logic and the compile time error in foloowing code.The code is not saving on IDE
#include
#include
using namespace std;
bool alreadyVisited(int a[][10],int r,int c){
if(a[r][c]==1)
return true;
return false;
}
void funkyMove(int a[][10],int r,int c,int n){
if(r>=n||c>=n||a[r][c]==0)
return ;
if(!alreadyVisited(a[][c],r,c)){
a[r][c]=2;
return ;
}
else
{
return ;
}
funkyMove(a[][10],r-2,c-1,n);
funkyMove(a[][10],r-2,c+1,n);
funkyMove(a[][10],r-1,c-2,n);
funkyMove(a[][10],r-1,c+2,n);
funkyMove(a[][10],r+1,c-2,n);
funkyMove(a[][10],r+1,c+2,n);
funkyMove(a[][10],r+2,c-1,n);
funkyMove(a[][10],r+2,c+1,n);
}
int main() {
int n;
cin>>n;
int arr[10][10];
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
a[i][j]=0;

int r=0,c=0;
for(int i=0;i<n;i++)
    for(int j=0;j<n;j++)
        cin>>a[i][j];
int ulc=0;//upper left corner flag        
for(int i=0;i<n;i++)
{    for(int j=0;j<n;j++)
        if(a[i][j]==1){
            r=i;
            c=j;
            ulc=1;
            break;
        }
    if(ulc==1)
        break;
} 
funkyMove(a[r][c],r,c,n); 
int flag=0;
for(int i=0;i<n;i++)
    for(int j=0;j<n;j++)
        if(a[i][j]==1)
            flag++;
for(int i=0;i<n;i++){
    for(int j=0;j<n;j++)
        cout<<a[i][j]<<" ";
 cout<<endl;           
}          

        
return 0;

}

please save your code at coding block ide and then share the generated link

The save button of Ide is not working.

do hard refresh and then try again

if(a[r][c]==1)
return true;
return false;
}
it will always return true only because it will never go to next line

not workign…On onther window also not working

The idea is to check if the element is visited then not to check it…
if(a[r][c]==1)

okay that okay

now
if(!alreadyVisited(a[][c],r,c)){
a[r][c]=2;
return ;
}
else
{
return ;
}
in this cell if visited first you you mark it 1
otherwise return;
in this way it will never move ahead

also
one thing you have to work on that is
If necessary, the knight is permitted to pass over regions that are outside the borders of the modified chessboard, but as usual, it can only move to squares that are within the borders of the board