Borderou de evaluare (job #2619112)
Utilizator | Bucur Andreea andreea.bucur | Data | 26 mai 2020 23:38:09 |
---|---|---|---|
Problema | Sortare prin comparare | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void mergesort(int*, int&, int&)':
main.cpp:35:22: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int'
mergesort(v, mij + 1, dr);
~~~~^~~
main.cpp:27:6: note: initializing argument 2 of 'void mergesort(int*, int&, int&)'
void mergesort(int v[],int& st,int& dr)
^~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:51:22: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int'
mergesort(a,0,n-1);
^
main.cpp:27:6: note: initializing argument 2 of 'void mergesort(int*, int&, int&)'
void mergesort(int v[],int& st,int& dr)
^~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !