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_34847651_23684.cpp: In function 'int main()':
0_0_34847651_23684.cpp:25:36: error: no matching function for call to 'std::map<std::basic_string<char>, int>::insert(std::string&)'
                     d.insert(concat);
                                    ^
0_0_34847651_23684.cpp:25:36: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:80,
                 from 0_0_34847651_23684.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:629:7: note: std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::basic_string<char>; _Tp = int; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, int> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const std::basic_string<char>, int>]
       insert(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:629:7: note:   no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'const value_type& {aka const std::pair<const std::basic_string<char>, int>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:637: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 __gnu_cxx::__alloc_traits<_Allocator>::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 = std::basic_string<char>; _Tp = int; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, int> >]
         insert(_Pair&& __x)
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:637:9: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:633:32: error: no type named 'type' in 'struct std::enable_if<false, void>'
       template<typename _Pair, typename = typename
                                ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:650:7: note: void std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::initializer_list<std::pair<const _Key, _Tp> >) [with _Key = std::basic_string<char>; _Tp = int; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, int> >]
       insert(std::initializer_list<value_type> __list)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:650:7: note:   no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'std::initializer_list<std::pair<const std::basic_string<char>, int> >'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:679: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 = std::basic_string<char>; _Tp = int; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const std::basic_string<char>, int>]
       insert(const_iterator __position, const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:679:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:690: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 = std::basic_string<char>; _Tp = int; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, int> >]
         insert(const_iterator __position, _Pair&& __x)
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:690:9: note:   template argument deduction/substitution failed:
0_0_34847651_23684.cpp:25:36: note:   cannot convert 'concat' (type 'std::string {aka std::basic_string<char>}') to type 'std::map<std::basic_string<char>, int>::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char>, int> >}'
                     d.insert(concat);
                                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:80,
                 from 0_0_34847651_23684.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:705:9: note: template<class _InputIterator> void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = std::basic_string<char>; _Tp = int; _Compare = std::less<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, int> >]
         insert(_InputIterator __first, _InputIterator __last)
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:705:9: note:   template argument deduction/substitution failed:
0_0_34847651_23684.cpp:25:36: note:   candidate expects 2 arguments, 1 provided
                     d.insert(concat);
                                    ^


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-26 14:34:02, Gzip enabled