0_0_36682676_30921.cpp: In function 'int main()':
0_0_36682676_30921.cpp:23:15: error: no match for 'operator[]' (operand types are 'std::map<std::basic_string<char>, int>' and 'std::pair<const std::basic_string<char>, int>')
if(res < mp[t])
^
0_0_36682676_30921.cpp:23:15: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_36682676_30921.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_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>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
operator[](const key_type& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'const key_type& {aka const std::basic_string<char>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_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>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
operator[](key_type&& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'std::map<std::basic_string<char>, int>::key_type&& {aka std::basic_string<char>&&}'
0_0_36682676_30921.cpp:25:13: error: no match for 'operator[]' (operand types are 'std::map<std::basic_string<char>, int>' and 'std::pair<const std::basic_string<char>, int>')
res = mp[t];
^
0_0_36682676_30921.cpp:25:13: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_36682676_30921.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_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>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
operator[](const key_type& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:491:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'const key_type& {aka const std::basic_string<char>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_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>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
operator[](key_type&& __k)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:511:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'std::map<std::basic_string<char>, int>::key_type&& {aka std::basic_string<char>&&}'
0_0_36682676_30921.cpp:26:7: error: no match for 'operator=' (operand types are 'std::string {aka std::basic_string<char>}' and 'std::pair<const std::basic_string<char>, int>')
s = t;
^
0_0_36682676_30921.cpp:26:7: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
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_36682676_30921.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:554:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
operator=(const basic_string& __str)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:554:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'const std::basic_string<char>&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:562:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
operator=(const _CharT* __s)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:562:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'const char*'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:573:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
operator=(_CharT __c)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:573:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'char'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:589:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(std::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
operator=(basic_string&& __str)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:589:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'std::basic_string<char>&&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:601:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
operator=(initializer_list<_CharT> __l)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:601:7: note: no known conversion for argument 1 from 'std::pair<const std::basic_string<char>, int>' to 'std::initializer_list<char>'
0_0_36682676_30921.cpp:28:20: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
printf("%s", s);
^
|