foo.cc: In function 'int bfs()':
foo.cc:12:14: error: 'd' was not declared in this scope
for(auto &v:d)
^
foo.cc:13:15: error: unable to deduce 'auto&&' from 'v'
for(auto &x:v)
^
foo.cc:15:2: error: 'd' was not declared in this scope
d[0][0]=0;
^
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)提供评测服务