foo.cpp: In function 'void check(int, int)':
foo.cpp:27:23: error: new declaration 'void check(int, int)'
void check(int x,int y)
^
foo.cpp:6:5: error: ambiguates old declaration 'int check(int, int)'
int check(int,int);
^
foo.cpp:31:13: error: invalid types 'int[int]' for array subscript
if(x[i]>=x-d&&x[i]<=x+d)
^
foo.cpp:31:24: error: invalid types 'int[int]' for array subscript
if(x[i]>=x-d&&x[i]<=x+d)
^
foo.cpp:32:15: error: invalid types 'int[int]' for array subscript
if(y[i]>=y-d&&y[i]<=y+d)
^
foo.cpp:32:26: error: invalid types 'int[int]' for array subscript
if(y[i]>=y-d&&y[i]<=y+d)
^
foo.cpp:34:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
return m;
^