/in/foo.c: In function 'main':
/in/foo.c:8:28: error: 'n' undeclared (first use in this function)
while (~scanf("%d%d", &n, &m) && n && m)
^
/in/foo.c:8:28: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:32: error: 'm' undeclared (first use in this function)
while (~scanf("%d%d", &n, &m) && n && m)
^
/in/foo.c:10:9: error: 'cas' undeclared (first use in this function)
cas=1;
^~~
/in/foo.c:11:9: warning: implicit declaration of function 'mem' [-Wimplicit-function-declaration]
mem(ma,0);
^~~
/in/foo.c:11:13: error: 'ma' undeclared (first use in this function)
mem(ma,0);
^~
/in/foo.c:12:13: error: 'l' undeclared (first use in this function)
mem(l,0);
^
/in/foo.c:27:25: error: 'dx' undeclared (first use in this function)
x=i+dx[k],y=j+dy[k];
^~
/in/foo.c:27:35: error: 'dy' undeclared (first use in this function)
x=i+dx[k],y=j+dy[k];
^~
/in/foo.c:27:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
x=i+dx[k],y=j+dy[k];
^
/in/foo.c:29:37: warning: left-hand operand of comma expression has no effect [-Wunused-value]
l[i][j][k]++,x=x+dx[k],y=y+dy[k];
^
/in/foo.c:29:47: warning: left-hand operand of comma expression has no effect [-Wunused-value]
l[i][j][k]++,x=x+dx[k],y=y+dy[k];
^
/in/foo.c:36:13: error: 'ans' undeclared (first use in this function)
ans=0;
^~~
/in/foo.c:7:15: warning: unused variable 'z' [-Wunused-variable]
int x, y, z;
^