Borderou de evaluare (job #788390)

Utilizator avatar alexbaldovin21 alex baldovin alexbaldovin21 IP ascuns
Problemă Bile1 (clasa a 7-a) Compilator cpp-32
Rundă Tema 3 Clasa a 7-a Status evaluat
Dată 27 sept. 2024 18:28:50 Scor 0

Raport evaluator

Eroare de compilare: main.cpp:3:1: error: 'ifstream' does not name a type 3 | ifstream in("bile1.in"); | ^~~~~~~~ main.cpp:4:1: error: 'ofstream' does not name a type 4 | ofstream out("bile1.out"); | ^~~~~~~~ main.cpp:6:41: error: conflicting declaration 'int n' 6 | int l[2000],c[10001],n[10001],v[2000],m,n,p,l,c,i; | ^ main.cpp:6:22: note: previous declaration as 'int n [10001]' 6 | int l[2000],c[10001],n[10001],v[2000],m,n,p,l,c,i; | ^ main.cpp:6:45: error: conflicting declaration 'int l' 6 | int l[2000],c[10001],n[10001],v[2000],m,n,p,l,c,i; | ^ main.cpp:6:5: note: previous declaration as 'int l [2000]' 6 | int l[2000],c[10001],n[10001],v[2000],m,n,p,l,c,i; | ^ main.cpp:6:47: error: conflicting declaration 'int c' 6 | int l[2000],c[10001],n[10001],v[2000],m,n,p,l,c,i; | ^ main.cpp:6:13: note: previous declaration as 'int c [10001]' 6 | int l[2000],c[10001],n[10001],v[2000],m,n,p,l,c,i; | ^ main.cpp: In function 'int main()': main.cpp:9:5: error: 'in' was not declared in this scope; did you mean 'yn'? 9 | in>>m>>n>>p; | ^~ | yn main.cpp:13:15: error: invalid conversion from 'int*' to 'int' [-fpermissive] 13 | c[i]=c-1; | ~^~ | | | int* main.cpp:14:15: error: invalid types 'int [2000][int*]' for array subscript 14 | n[i]=l[l-1]; | ^ main.cpp:15:10: error: invalid types 'int [2000][int*]' for array subscript 15 | l[l-1]=i; | ^ main.cpp:17:11: error: incompatible types in assignment of 'int' to 'int [10001]' 17 | for (c=0;c<n;c++) | ~^~ main.cpp:17:15: warning: comparison between two arrays [-Warray-compare] 17 | for (c=0;c<n;c++) | ~^~ main.cpp:17:15: note: use unary '+' which decays operands to pointers or '&c[0] < &n[0]' to compare the addresses main.cpp:17:18: error: lvalue required as increment operand 17 | for (c=0;c<n;c++) | ^