/in/foo.cc:6:1: error: expected initializer before 'bool'
bool next_chess[maxn][maxn];
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:11:9: error: 'chess' was not declared in this scope
cin>>chess[i][j];
^~~~~
/in/foo.cc:17:8: error: 'chess' was not declared in this scope
if(chess[i][j]){
^~~~~
/in/foo.cc:18:15: error: 'check' was not declared in this scope
if(check()<2||check()>3)next_chess[i][j] = 0;
^
/in/foo.cc:18:30: error: 'next_chess' was not declared in this scope
if(check()<2||check()>3)next_chess[i][j] = 0;
^~~~~~~~~~
/in/foo.cc:20:15: error: 'check' was not declared in this scope
if(check()==3)next_chess[i][j] = 1;
^
/in/foo.cc:20:20: error: 'next_chess' was not declared in this scope
if(check()==3)next_chess[i][j] = 1;
^~~~~~~~~~
/in/foo.cc:26:5: error: 'chess' was not declared in this scope
chess[i][j] = next_chess[i][j] ;
^~~~~
/in/foo.cc:26:11: error: 'i' was not declared in this scope
chess[i][j] = next_chess[i][j] ;
^
/in/foo.cc:26:14: error: 'j' was not declared in this scope
chess[i][j] = next_chess[i][j] ;
^
/in/foo.cc:26:19: error: 'next_chess' was not declared in this scope
chess[i][j] = next_chess[i][j] ;
^~~~~~~~~~
/in/foo.cc:30:22: error: expected ')' before '{' token
for(int i=1;i<=N;i++{
^
/in/foo.cc:32:10: error: 'next_chess' was not declared in this scope
cout<<next_chess[i][j];
^~~~~~~~~~