Main.cc: In function ‘int dfs(int, int)’: Main.cc:15:26: error: ‘DFS’ was not declared in this scope f[x][y] = max(f[x][y],DFS(next_x,next_y) + 1); ^~~ Main.cc: In function ‘int main()’: Main.cc:30:20: error: ‘DFS’ was not declared in this scope maxn = max(maxn,DFS(i,j)); ^~~