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:43:29: error: no matching function for call to 'std::vector<std::vector<int> >::resize(int, int)'
          map.resize(v+1, INF);
                             ^
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/shortestP2P.hpp:3,
                 from /in/driver/main.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:689:7: note: candidate: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]
       resize(size_type __new_size)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:689:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/7/bits/stl_vector.h:709:7: note: candidate: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<int>]
       resize(size_type __new_size, const value_type& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:709:7: note:   no known conversion for argument 2 from 'int' to 'const value_type& {aka const std::vector<int>&}'

Information

Submit By
Type
Submission
Homework
Project 4
Language
C++
Submit At
2024-08-09 09:03:06
Judged At
2024-08-09 09:03:06
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes