Record Detail

Compile Error

In file included from /in/driver/main.cpp:4:0:
/in/sort.hpp: In instantiation of 'void merge_sort(std::vector<T>&, Compare) [with T = node; Compare = bool (*)(const node&, const node&)]':
/in/driver/main.cpp:143:44:   required from here
/in/sort.hpp:124:13: error: invalid initialization of reference of type 'const node&' from expression of type 'int'
     if (comp(n, 2)) return;
         ~~~~^~~~~~
/in/sort.hpp: In instantiation of 'void quick_sort_extra(std::vector<T>&, Compare) [with T = node; Compare = bool (*)(const node&, const node&)]':
/in/driver/main.cpp:147:50:   required from here
/in/sort.hpp:171:13: error: invalid initialization of reference of type 'const node&' from expression of type 'int'
     if (comp(n, 2)) return;
         ~~~~^~~~~~
/in/sort.hpp: In instantiation of 'void quick_sort_inplace(std::vector<T>&, Compare) [with T = node; Compare = bool (*)(const node&, const node&)]':
/in/driver/main.cpp:151:52:   required from here
/in/sort.hpp:210:13: error: invalid initialization of reference of type 'const node&' from expression of type 'int'
     if (comp(n, 2)) return;
         ~~~~^~~~~~

Information

Submit By
Type
Submission
Homework
Project 1
Language
C++
Submit At
2021-10-18 06:12:52
Judged At
2021-10-18 06:12:52
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes