/in/foo.cc:9:17: error: 'int yn [100010][7]' redeclared as different kind of symbol
int yn[100010][7];
^
In file included from /usr/include/features.h:364:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
from /usr/include/c++/6/iostream:38,
from /in/foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:252:1: note: previous declaration 'double yn(int, double)'
__MATHCALL (yn,, (int, _Mdouble_));
^
/in/foo.cc: In function 'void dfs(int, int, int)':
/in/foo.cc:19:6: warning: pointer to a function used in arithmetic [-Wpointer-arith]
yn[y][x]=1;
^
/in/foo.cc:19:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
yn[y][x]=1;
^
/in/foo.cc:19:11: error: assignment of read-only location '*(yn + (((sizetype)y) + ((sizetype)x)))'
yn[y][x]=1;
^
/in/foo.cc:19:11: error: cannot convert 'int' to 'double(int, double) throw ()' in assignment
/in/foo.cc:23:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(r>=1&&r<=n&&c>=1&&c<=m&&yn[r][c]==-1&&map[r][c]!='X')
^
/in/foo.cc:23:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(r>=1&&r<=n&&c>=1&&c<=m&&yn[r][c]==-1&&map[r][c]!='X')
^
/in/foo.cc:23:41: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(r>=1&&r<=n&&c>=1&&c<=m&&yn[r][c]==-1&&map[r][c]!='X')
^
/in/foo.cc:28:6: warning: pointer to a function used in arithmetic [-Wpointer-arith]
yn[y][x]=-1;
^
/in/foo.cc:28:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
yn[y][x]=-1;
^
/in/foo.cc:28:12: error: assignment of read-only location '*(yn + (((sizetype)y) + ((sizetype)x)))'
yn[y][x]=-1;
^
/in/foo.cc:28:12: error: cannot convert 'int' to 'double(int, double) throw ()' in assignment
/in/foo.cc: In function 'int main()':
/in/foo.cc:35:25: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
memset(yn,-1,sizeof(yn));
^
/in/foo.cc:35:26: error: invalid conversion from 'double (*)(int, double) throw ()' to 'void*' [-fpermissive]
memset(yn,-1,sizeof(yn));
^
In file included from /usr/include/c++/6/cstring:42:0,
from /in/foo.cc:3:
/usr/include/string.h:62:14: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
^~~~~~
/in/foo.cc:41:25: error: 'endy' was not declared in this scope
if(map[i][j]=='D') {endy=i;endx=j;}
^~~~
/in/foo.cc:41:32: error: 'endx' was not declared in this scope
if(map[i][j]=='D') {endy=i;endx=j;}
^~~~
/in/foo.cc:43:11: error: 'endy' was not declared in this scope
if((abs(endy-y)+abs(endx-x))%2!=t%2||abs(endy-y)+abs(endx-x)>t)
^~~~
/in/foo.cc:43:23: error: 'endx' was not declared in this scope
if((abs(endy-y)+abs(endx-x))%2!=t%2||abs(endy-y)+abs(endx-x)>t)
^~~~