/in/foo.cc:17:1: error: expected initializer before 'int'
int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
^~~
/in/foo.cc:17:40: error: expected unqualified-id before ',' token
int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
^
/in/foo.cc:17:48: error: expected constructor, destructor, or type conversion before '=' token
int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, 1, -1};
^
/in/foo.cc: In function 'void bfs()':
/in/foo.cc:33:32: error: 'dx' was not declared in this scope
int nx = t.first + dx[i];
^~
/in/foo.cc:34:33: error: 'dy' was not declared in this scope
int ny = t.second + dy[i];
^~
/in/foo.cc:41:62: error: 'maze' was not declared in this scope
if(nx < 0 || nx >= n || ny < 0 || ny >= m || maze[nx][ny] == 'X') break;//这里说明受阻了,飞镖停下来
^~~~
/in/foo.cc:51:32: error: 'dx' was not declared in this scope
int nx = t.first + dx[i];
^~
/in/foo.cc:52:33: error: 'dy' was not declared in this scope
int ny = t.second + dy[i];
^~
/in/foo.cc:53:58: error: 'maze' was not declared in this scope
if(nx >= 0 && nx < n && ny >= 0 && ny < m && maze[nx][ny] != 'X' && !vis[nx][ny]){
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:69:16: error: 'maze' was not declared in this scope
cin >> maze[i];
^~~~