Record Detail

Compile Error

In file included from /in/driver/main.cpp:1:0:
/in/shortestP2P.hpp: In member function 'void ShortestP2P::readGraph()':
/in/shortestP2P.hpp:46:29: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
     if (hasNegativeCycle(0, vector<int>(numVertices, 0))) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/shortestP2P.hpp:25:10: note:   initializing argument 2 of 'bool ShortestP2P::hasNegativeCycle(unsigned int, std::vector<int>&)'
     bool hasNegativeCycle(unsigned int start, vector<int>& dist);
          ^~~~~~~~~~~~~~~~
/in/shortestP2P.hpp: In member function 'bool ShortestP2P::hasNegativeCycle(unsigned int, std::vector<int>&)':
/in/shortestP2P.hpp:100:49: error: unused parameter 'start' [-Werror=unused-parameter]
 bool ShortestP2P::hasNegativeCycle(unsigned int start, vector<int>& dist) {
                                                 ^~~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Project 4: Shortest Path
Language
C++
Submit At
2023-12-10 17:28:31
Judged At
2023-12-10 17:28:31
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes