Its giving some undesired error

#include
using namespace std;
void spiralroll(int a[][1000],int row,int col)
{
int start_row=0;
int start_col=0;
int end_row=row-1;
int end_col=col-1;
int noe=0;
while(noe<row*col){
for(int i=start_col;i<end_col;i++){
cout<<a[start_row][i];
noe++;
}
start_row++;
for(int i=start_row;i<end_row;i++){
cout<<a[i][end_row];
noe++;
}
end_col–;
for(int i=end_col;i>=start_col;i–){
cout<<a[end_row][i];
noe++;
}
end_row–;
for(int i=end_row;i>=start_row;i–){
cout<<a[i][start_col];
noe++;
}
start_col++;
}

}
int main(){
int m,n;
cin>>m;
cin>>n;
int a[1000][1000];
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
cin>>a[i][j];
}
}
spiralroll(a,m,n);
return 0;
}

i have corrected and added comments please check the code

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.