Borderou de evaluare (job #2286435)

Utilizator mihaimodiMihai Modi mihaimodi Data 20 noiembrie 2018 11:22:59
Problema Expresie2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int s1(int&, int&)': main.cpp:24:17: warning: operation on 'x' may be undefined [-Wsequence-point] aux[++x]=aux[x-1]+nr; ^~~ main.cpp:29:31: error: 's2' was not declared in this scope suma=suma+s2(i,cnt); ^ main.cpp:31:20: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int' return s1(i+1,cnt); ~^~ main.cpp:9:5: note: initializing argument 1 of 'int s1(int&, int&)' int s1(int &i,int &cnt) ^~ main.cpp: In function 'int s2(int&, int&)': main.cpp:67:20: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int' return s2(i+1,cnt); ~^~ main.cpp:46:5: note: initializing argument 1 of 'int s2(int&, int&)' int s2(int &i, int &cnt) ^~ main.cpp: In function 'int main()': main.cpp:99:13: error: 'cnts' was not declared in this scope cnts=cnt; ^~~~ main.cpp:105:13: error: 'cnts' was not declared in this scope cnts=cnt; ^~~~ Non zero exit status: 1

Ceva nu functioneaza?