foo.c: In function 'dfs':
foo.c:13:1: error: 'for' loop initial declarations are only allowed in C99 mode
for(int x = 0; x < 12; x++) {
^
foo.c:13:1: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:16:20: warning: comparison between pointer and integer [enabled by default]
if(!vis[v] && s[v] == '#')
^
foo.c: In function 'main':
foo.c:25:1: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i = 0; i < n; i++)
^
foo.c:27:9: error: redefinition of 'i'
for(int i = 0; i < n; i++)
^
foo.c:25:9: note: previous definition of 'i' was here
for(int i = 0; i < n; i++)
^
foo.c:27:1: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i = 0; i < n; i++)
^
foo.c:28:1: error: 'for' loop initial declarations are only allowed in C99 mode
for(int j = 0; j < m; j++)
^