Borderou de evaluare (job #748460)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Primrec (clasa a 7-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 1 dec. 2023 00:17:47 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:28:16: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
28 | fout<<prim(a,2)<<' '<<prim(b,2)<<' '<<prim(c,2);
| ^
main.cpp:8:23: note: initializing argument 2 of 'int prim(int&, int&)'
8 | int prim(int& n, int& divizor ) {
| ~~~~~^~~~~~~
main.cpp:28:32: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
28 | fout<<prim(a,2)<<' '<<prim(b,2)<<' '<<prim(c,2);
| ^
main.cpp:8:23: note: initializing argument 2 of 'int prim(int&, int&)'
8 | int prim(int& n, int& divizor ) {
| ~~~~~^~~~~~~
main.cpp:28:48: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
28 | fout<<prim(a,2)<<' '<<prim(b,2)<<' '<<prim(c,2);
| ^
main.cpp:8:23: note: initializing argument 2 of 'int prim(int&, int&)'
8 | int prim(int& n, int& divizor ) {
| ~~~~~^~~~~~~
main.cpp: In function 'int prim(int&, int&)':
main.cpp:19:17: warning: control reaches end of non-void function [-Wreturn-type]
19 | prim(n, divizor);
| ~~~~^~~~~~~~~~~~