Here is my code where I am getting error:
#include<bits/stdc++.h>
using namespace std;
int n;
bool is_attacked(int board[][n],int x,int y) //Here I am getting error
{
    for(int i=0;i<n;i++)
    {
        if(board[x][i])
        return false;
    }
    for(int i=0;i<n;i++)
    {
        if(board[i][y])
        return false;
    }
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<n;j++)
        {
            if(board[i][j]&&(x+y==i+j||i-j==x-y))
            return false;
        }
    }
    return true;
}
It is giving error in function parameters of is_attacked and the error coming is:
array bound is not an integer constant before ']' token
Could anyone please tell me what I am doing wrong? Thanks in advance?
