F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_29719492_30160.cpp: In function 'int main()':
0_0_29719492_30160.cpp:64:45: error: no matching function for call to 'std::vector<char>::erase(__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type&)'
                         cur.erase(cur.back());
                                             ^
0_0_29719492_30160.cpp:64:45: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.h:34,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:49,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_29719492_30160.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1146:7: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = char; _Alloc = std::allocator<char>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::vector<char> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = char*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const char*, std::vector<char> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const char*]
       erase(const_iterator __position)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1146:7: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type {aka char}' to 'std::vector<char>::const_iterator {aka __gnu_cxx::__normal_iterator<const char*, std::vector<char> >}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1173:7: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = char; _Alloc = std::allocator<char>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::vector<char> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = char*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const char*, std::vector<char> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const char*]
       erase(const_iterator __first, const_iterator __last)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1173:7: note:   candidate expects 2 arguments, 1 provided


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-18 01:24:56, Gzip enabled