Borderou de evaluare (job #1030552)

Utilizator impulseBagu Alexandru impulse Data 15 noiembrie 2013 16:33:08
Problema Dtcsu Status done
Runda FMI No Stress 4 Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:18:19: error: no matching function for call to ‘std::map<int, int>::insert(int&)’ h.insert(w); ^ user.cpp:18:19: note: candidates are: In file included from /usr/local/include/c++/4.8.0/map:61:0, from user.cpp:1: /usr/local/include/c++/4.8.0/bits/stl_map.h:594:7: note: std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree_iterator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, int>] insert(const value_type& __x) ^ /usr/local/include/c++/4.8.0/bits/stl_map.h:594:7: note: no known conversion for argument 1 from ‘int’ to ‘const value_type& {aka const std::pair<const int, int>&}’ /usr/local/include/c++/4.8.0/bits/stl_map.h:602:9: note: template<class _Pair, class> std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(_Pair&&) [with _Pair = _Pair; <template-parameter-2-2> = <template-parameter-1-2>; _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >] insert(_Pair&& __x) ^ /usr/local/include/c++/4.8.0/bits/stl_map.h:602:9: note: template argument deduction/substitution failed: /usr/local/include/c++/4.8.0/bits/stl_map.h:598:32: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ template<typename _Pair, typename = typename ^ /usr/local/include/c++/4.8.0/bits/stl_map.h:615:7: note: void std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::initializer_list<std::pair<const _Key, _Tp> >) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >] insert(std::initializer_list<value_type> __list) ^ /usr/local/include/c++/4.8.0/bits/stl_map.h:615:7: note: no known conversion for argument 1 from ‘int’ to ‘std::initializer_list<std::pair<const int, int> >’ /usr/local/include/c++/4.8.0/bits/stl_map.h:644:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, int>] insert(const_iterator __position, const value_type& __x) ^ /usr/local/include/c++/4.8.0/bits/stl_map.h:644:7: note: candidate expects 2 arguments, 1 provided /usr/local/include/c++/4.8.0/bits/stl_map.h:655:9: note: template<class _Pair, class> std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, _Pair&&) [with _Pair = _Pair; <template-parameter-2-2> = <template-parameter-1-2>; _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >] insert(const_iterator __position, _Pair&& __x) ^ /usr/local/include/c++/4.8.0/bits/stl_map.h:655:9: note: template argument deduction/substitution failed: user.cpp:18:19: note: cannot convert ‘w’ (type ‘int’) to type ‘std::map<int, int>::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const int, int> >}’ h.insert(w); ^ In file included from /usr/local/include/c++/4.8.0/map:61:0, from user.cpp:1: /usr/local/include/c++/4.8.0/bits/stl_map.h:670:9: note: template<class _InputIterator> void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >] insert(_InputIterator __first, _InputIterator __last) ^ /usr/local/include/c++/4.8.0/bits/stl_map.h:670:9: note: template argument deduction/substitution failed: user.cpp:18:19: note: candidate expects 2 arguments, 1 provided h.insert(w); ^ user.cpp:24:20: error: no matching function for call to ‘std::map<int, int>::find(std::map<int, int>&)’ if(h.find(h) != h.end()) c++; ^ user.cpp:24:20: note: candidates are: In file included from /usr/local/include/c++/4.8.0/map:61:0, from user.cpp:1: /usr/local/include/c++/4.8.0/bits/stl_map.h:820:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const key_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] find(const key_type& __x)

Ceva nu functioneaza?