Borderou de evaluare (job #1608714)

Utilizator ana-maria.simiAna-Maria Simionescu ana-maria.simi Data 22 februarie 2016 12:05:38
Problema Rj Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:6:41: error: conflicting declaration ‘pozitie j’ struct pozitie {int lin,col;}q[10010],r,j,p,v; ^ user.cpp:4:31: error: ‘j’ has a previous declaration as ‘int j’ int a[101][101],b[101][101],i,j,n,m,dl[]={-1,-1,0,1,1,1,0,-1},dc[]={0,1,1,1,0,-1,-1,-1},prim,ultim,k,minim,pi,pj; ^ user.cpp: In function ‘int main()’: user.cpp:20:16: error: request for member ‘lin’ in ‘j’, which is of non-class type ‘int’ {j.lin=i; ^ user.cpp:21:15: error: request for member ‘col’ in ‘j’, which is of non-class type ‘int’ j.col=j;}} ^ user.cpp:42:26: error: request for member ‘lin’ in ‘j’, which is of non-class type ‘int’ while(prim<=ultim && a[j.lin][j.col]==0) ^ user.cpp:42:33: error: request for member ‘col’ in ‘j’, which is of non-class type ‘int’ while(prim<=ultim && a[j.lin][j.col]==0) ^ user.cpp:53:8: error: no match for ‘operator=’ (operand types are ‘pozitie’ and ‘int’) q[prim]=j; ^ user.cpp:53:8: note: candidates are: user.cpp:6:8: note: pozitie& pozitie::operator=(const pozitie&) struct pozitie {int lin,col;}q[10010],r,j,p,v; ^ user.cpp:6:8: note: no known conversion for argument 1 from ‘int’ to ‘const pozitie&’ user.cpp:6:8: note: pozitie& pozitie::operator=(pozitie&&) user.cpp:6:8: note: no known conversion for argument 1 from ‘int’ to ‘pozitie&&’ user.cpp:54:5: error: request for member ‘lin’ in ‘j’, which is of non-class type ‘int’ b[j.lin][j.col]=1; ^ user.cpp:54:12: error: request for member ‘col’ in ‘j’, which is of non-class type ‘int’ b[j.lin][j.col]=1; ^ user.cpp:8:30: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] {freopen("rj.in", "r", stdin); ^ user.cpp:9:31: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("rj.out", "w", stdout); ^ user.cpp:10:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d\n", &n, &m); ^ user.cpp:13:25: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] {scanf("%c", &c); ^ user.cpp:22:16: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("\n");} ^

Ceva nu functioneaza?