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_23033239_22435.cpp: In lambda function:
0_0_23033239_22435.cpp:32:53: error: invalid type argument of unary '*' (have 'int')
  remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                                     ^
0_0_23033239_22435.cpp:32:59: error: 'd' is not captured
  remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                                           ^
0_0_23033239_22435.cpp: In lambda function:
0_0_23033239_22435.cpp:41:62: error: invalid type argument of unary '*' (have 'int')
           remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                                              ^
0_0_23033239_22435.cpp:41:68: error: 'd' is not captured
           remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                                                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_23033239_22435.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = std::_List_iterator<A>; _Predicate = main()::<lambda(int)>]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:866:28:   required from '_ForwardIterator std::__remove_if(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = std::_List_iterator<A>; _Predicate = __gnu_cxx::__ops::_Iter_pred<main()::<lambda(int)> >]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:937:47:   required from '_FIter std::remove_if(_FIter, _FIter, _Predicate) [with _FIter = std::_List_iterator<A>; _Predicate = main()::<lambda(int)>]'
0_0_23033239_22435.cpp:32:62:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:231:30: error: no match for call to '(main()::<lambda(int)>) (A&)'
  { return bool(_M_pred(*__it)); }
                              ^
0_0_23033239_22435.cpp:32:36: note: candidates are:
  remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_23033239_22435.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:231:30: note: void (*)(int) <conversion>
  { return bool(_M_pred(*__it)); }
                              ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:231:30: note:   candidate expects 2 arguments, 2 provided
0_0_23033239_22435.cpp:32:43: note: main()::<lambda(int)>
  remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                           ^
0_0_23033239_22435.cpp:32:43: note:   no known conversion for argument 1 from 'A' to 'int'
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_23033239_22435.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = std::_List_iterator<A>; _Predicate = main()::<lambda(int)>]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:866:28:   required from '_ForwardIterator std::__remove_if(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = std::_List_iterator<A>; _Predicate = __gnu_cxx::__ops::_Iter_pred<main()::<lambda(int)> >]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:937:47:   required from '_FIter std::remove_if(_FIter, _FIter, _Predicate) [with _FIter = std::_List_iterator<A>; _Predicate = main()::<lambda(int)>]'
0_0_23033239_22435.cpp:41:71:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:231:30: error: no match for call to '(main()::<lambda(int)>) (A&)'
  { return bool(_M_pred(*__it)); }
                              ^
0_0_23033239_22435.cpp:41:45: note: candidates are:
           remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                             ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_23033239_22435.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:231:30: note: void (*)(int) <conversion>
  { return bool(_M_pred(*__it)); }
                              ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:231:30: note:   candidate expects 2 arguments, 2 provided
0_0_23033239_22435.cpp:41:52: note: main()::<lambda(int)>
           remove_if(loc.begin(),loc.end(),[ ](int i){return(*i).x==d;});
                                                    ^
0_0_23033239_22435.cpp:41:52: note:   no known conversion for argument 1 from 'A' to 'int'


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-21 01:29:39, Gzip enabled