Record Detail

Compile Error

In file included from /in/driver/main.cpp:4:0:
/in/sort.hpp: In instantiation of 'void merge_sort_helper(std::vector<T>&, int, int, Compare) [with T = node; Compare = bool (*)(const node&, const node&)]':
/in/sort.hpp:125:22:   required from '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:111:13: error: invalid initialization of reference of type 'const node&' from expression of type 'int'
     if (comp(left, right))
         ~~~~^~~~~~~~~~~~~
/in/sort.hpp: In instantiation of 'void quick_sort_extra_helper(std::vector<T>&, int, int, Compare) [with T = node; Compare = bool (*)(const node&, const node&)]':
/in/sort.hpp:172:28:   required from '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:130:13: error: invalid initialization of reference of type 'const node&' from expression of type 'int'
     if (comp(left, right))
         ~~~~^~~~~~~~~~~~~
/in/sort.hpp: In instantiation of 'void quick_sort_inplace_helper(std::vector<T>&, int, int, Compare) [with T = node; Compare = bool (*)(const node&, const node&)]':
/in/sort.hpp:211:30:   required from '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:198:13: error: invalid initialization of reference of type 'const node&' from expression of type 'int'
     if (comp(left, right))
         ~~~~^~~~~~~~~~~~~

Information

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