fork download
  1. #include <vector>
  2.  
  3. int main() {
  4. std::vector<int> vec(15);
  5. vec.erase(vec.cbegin());
  6. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:5:24: error: no matching function for call to 'std::vector<int>::erase(std::vector<int>::const_iterator)'
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/vector.tcc:133:5: note: candidates are: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = int, _Alloc = std::allocator<int>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >, typename std::vector<_Tp, _Alloc>::_Base::_Tp_alloc_type::pointer = int*]
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/vector.tcc:145:5: note:                 std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::iterator) [with _Tp = int, _Alloc = std::allocator<int>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >, typename std::vector<_Tp, _Alloc>::_Base::_Tp_alloc_type::pointer = int*]
stdout
Standard output is empty