Problem leave
User isaackhong
Submission Time 2023-04-20 21:21:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

leave.cpp: In function ‘int main()’:
leave.cpp:19:22: error: cannot convert ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ to ‘int’ in assignment
19 | it = find(q.begin(), q.end(), person);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__normal_iterator<int*, std::vector<int> >
leave.cpp:20:23: error: no matching function for call to ‘std::vector<int>::erase(int&)’
20 | q.erase(it);
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from leave.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:14