foo.c: In function 'main':
foo.c:15:9: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i=1;i<=n;i++)
^
foo.c:15:9: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:16:13: error: 'for' loop initial declarations are only allowed in C99 mode
for(int j=1;j<=n;j++) map[i][j]=max;
^
foo.c:17:17: error: redefinition of 'i'
for(int i=1;i<=m;i++)
^
foo.c:15:17: note: previous definition of 'i' was here
for(int i=1;i<=n;i++)
^
foo.c:17:9: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i=1;i<=m;i++)
^
foo.c:23:17: error: redefinition of 'i'
for(int i=1;i<=n;i++)
^
foo.c:17:17: note: previous definition of 'i' was here
for(int i=1;i<=m;i++)
^
foo.c:23:9: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i=1;i<=n;i++)
^
foo.c:24:21: error: redefinition of 'j'
for(int j=1;j<=n;j++) dist[i][j]=map[i][j];
^
foo.c:16:21: note: previous definition of 'j' was here
for(int j=1;j<=n;j++) map[i][j]=max;
^
foo.c:24:13: error: 'for' loop initial declarations are only allowed in C99 mode
for(int j=1;j<=n;j++) dist[i][j]=map[i][j];
^
foo.c:26:9: error: 'for' loop initial declarations are only allowed in C99 mode
for(int k=1;k<=n;k++)
^
foo.c:28:13: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i=1;i<=k-1;i++)
^
foo.c:29:17: error: 'for' loop initial declarations are only allowed in C99 mode
for(int j=i+1;j<=k-1;j++)
^
foo.c:31:21: error: redefinition of 'i'
for(int i=1;i<=n;i++)
^
foo.c:28:21: note: previous definition of 'i' was here
for(int i=1;i<=k-1;i++)
^
foo.c:31:13: error: 'for' loop initial declarations are only allowed in C99 mode
for(int i=1;i<=n;i++)
^
foo.c:32:25: error: redefinition of 'j'
for(int j=1;j<=n;j++)
^
foo.c:29:25: note: previous definition of 'j' was here
for(int j=i+1;j<=k-1;j++)
^
foo.c:32:17: error: 'for' loop initial declarations are only allowed in C99 mode
for(int j=1;j<=n;j++)
^