foo.cc: In function 'int bfs()':
foo.cc:23:15: error: 'n' was not declared in this scope
if(x>=0&&x<n&&y>=0&&y<m&&g[x][y]=='.')
^
foo.cc:23:26: error: 'm' was not declared in this scope
if(x>=0&&x<n&&y>=0&&y<m&&g[x][y]=='.')
^
foo.cc:23:29: error: 'g' was not declared in this scope
if(x>=0&&x<n&&y>=0&&y<m&&g[x][y]=='.')
^
foo.cc:33:11: error: 'n' was not declared in this scope
return d[n-1][m-1];
^
foo.cc:33:16: error: 'm' was not declared in this scope
return d[n-1][m-1];
^
foo.cc: In function 'int main()':
foo.cc:42:15: error: 'g' was not declared in this scope
scanf("%c",&g[i][j])
^
foo.cc:38:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务