Borderou de evaluare (job #2050563)

Utilizator alex02Grigore Alexandru alex02 Data 28 octombrie 2017 10:28:29
Problema Livada Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int* candidat(int*, int)’: user.cpp:28:14: error: expected identifier before numeric constant int rez=[2]; ^ user.cpp: In lambda function: user.cpp:28:16: error: expected ‘{’ before ‘;’ token int rez=[2]; ^ user.cpp: In function ‘int* candidat(int*, int)’: user.cpp:28:16: error: invalid user-defined conversion from ‘candidat(int*, int)::__lambda0’ to ‘int’ [-fpermissive] user.cpp:28:15: note: candidate is: candidat(int*, int)::__lambda0::operator void (*)()() const <near match> int rez=[2]; ^ user.cpp:28:15: note: no known conversion for implicit ‘this’ parameter from ‘void (*)()’ to ‘int’ user.cpp:29:10: error: invalid types ‘int[int]’ for array subscript rez[0]=c; ^ user.cpp:30:10: error: invalid types ‘int[int]’ for array subscript rez[1]=contor; ^ user.cpp:32:16: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive] return rez; ^ user.cpp: In function ‘int main()’: user.cpp:43:14: error: expected identifier before numeric constant int rez=[2] ^ user.cpp: In lambda function: user.cpp:44:5: error: expected ‘{’ before ‘rez’ rez=candidat(sir, n); ^ user.cpp: In function ‘int main()’: user.cpp:44:5: error: invalid user-defined conversion from ‘main()::__lambda1’ to ‘int’ [-fpermissive] user.cpp:43:15: note: candidate is: main()::__lambda1::operator void (*)()() const <near match> int rez=[2] ^ user.cpp:43:15: note: no known conversion for implicit ‘this’ parameter from ‘void (*)()’ to ‘int’ user.cpp:44:5: error: expected ‘,’ or ‘;’ before ‘rez’ rez=candidat(sir, n); ^ user.cpp:45:13: error: invalid types ‘int[int]’ for array subscript g<<rez[0]<<rez[1]; ^ user.cpp:45:21: error: invalid types ‘int[int]’ for array subscript g<<rez[0]<<rez[1]; ^ user.cpp: In function ‘int* candidat(int*, int)’: user.cpp:33:1: warning: control reaches end of non-void function [-Wreturn-type] } ^

Ceva nu functioneaza?