prog.cpp:3:13: error: ‘NMAX’ was not declared in this scope
int visited[NMAX][NMAX];
^~~~
prog.cpp:3:13: note: suggested alternative: ‘NAN’
int visited[NMAX][NMAX];
^~~~
NAN
prog.cpp:3:19: error: ‘NMAX’ was not declared in this scope
int visited[NMAX][NMAX];
^~~~
prog.cpp:3:19: note: suggested alternative: ‘NAN’
int visited[NMAX][NMAX];
^~~~
NAN
prog.cpp:13:19: error: ‘NMAX’ was not declared in this scope
int dfs(char cake[NMAX][NMAX],int i,int j,int n)
^~~~
prog.cpp:13:19: note: suggested alternative: ‘NAN’
int dfs(char cake[NMAX][NMAX],int i,int j,int n)
^~~~
NAN
prog.cpp:13:25: error: ‘NMAX’ was not declared in this scope
int dfs(char cake[NMAX][NMAX],int i,int j,int n)
^~~~
prog.cpp:13:25: note: suggested alternative: ‘NAN’
int dfs(char cake[NMAX][NMAX],int i,int j,int n)
^~~~
NAN
prog.cpp:13:30: error: expected ‘)’ before ‘,’ token
int dfs(char cake[NMAX][NMAX],int i,int j,int n)
~ ^
)
prog.cpp:13:31: error: expected unqualified-id before ‘int’
int dfs(char cake[NMAX][NMAX],int i,int j,int n)
^~~
prog.cpp:31:27: error: ‘NMAX’ was not declared in this scope
int solve(int n,char cake[NMAX][NMAX])
^~~~
prog.cpp:31:27: note: suggested alternative: ‘NAN’
int solve(int n,char cake[NMAX][NMAX])
^~~~
NAN
prog.cpp:31:33: error: ‘NMAX’ was not declared in this scope
int solve(int n,char cake[NMAX][NMAX])
^~~~
prog.cpp:31:33: note: suggested alternative: ‘NAN’
int solve(int n,char cake[NMAX][NMAX])
^~~~
NAN
prog.cpp: In function ‘int solve(...)’:
prog.cpp:33:9: error: ‘visited’ was not declared in this scope
memset(visited,0,sizeof(visited));
^~~~~~~
prog.cpp:33:9: note: suggested alternative: ‘finitel’
memset(visited,0,sizeof(visited));
^~~~~~~
finitel
prog.cpp:35:19: error: ‘n’ was not declared in this scope
for(int i=0;i<n;i++)
^
prog.cpp:39:16: error: ‘cake’ was not declared in this scope
if(cake[i][j]=='1' && visited[i][j]==0)
^~~~