Borderou de evaluare (job #665087)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Butoane (clasa a 8-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 30 sept. 2022 09:08:41 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:66:35: error: no matching function for call to 'std::vector<int>::erase(int*, int*)'
66 | misc.erase(&i , &i);
| ~~~~~~~~~~^~~~~~~~~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/vector:67,
from /usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/queue:61,
from /usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/i686-pc-linux-gnu/bits/stdc++.h:86,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/bits/stl_vector.h:1430:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = std::vector<int>::iterator; std::vector<_Tp, _Alloc>::const_iterator = std::vector<int>::const_iterator]'
1430 | erase(const_iterator __position)
| ^~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/bits/stl_vector.h:1430:7: note: candidate expects 1 argument, 2 provided
/usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/bits/stl_vector.h:1457:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = std::vector<int>::iterator; std::vector<_Tp, _Alloc>::const_iterator = std::vector<int>::const_iterator]'
1457 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/bits/stl_vector.h:1457:28: note: no known conversion for argument 1 from 'int*' to 'std::vector<int>::const_iterator'
1457 | erase(const_iterator __first, const_iterator __last)
| ~~~~~~~~~~~~~~~^~~~~~~