0_0_30570791_27652.cpp: In function 'void solve()':
0_0_30570791_27652.cpp:42:10: error: no match for 'operator[]' (operand types are 'std::map<char, int>' and 'std::string {aka std::basic_string<char>}')
mp_boy[name_boy[i]]=i;
^
0_0_30570791_27652.cpp:42:10: 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_30570791_27652.cpp:1:
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 = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = 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::string {aka std::basic_string<char>}' to 'const key_type& {aka const 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 = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = 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::string {aka std::basic_string<char>}' to 'std::map<char, int>::key_type&& {aka char&&}'
0_0_30570791_27652.cpp:47:11: error: no match for 'operator[]' (operand types are 'std::map<char, int>' and 'std::string {aka std::basic_string<char>}')
mp_girl[name_girl[i]]=i;
^
0_0_30570791_27652.cpp:47:11: 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_30570791_27652.cpp:1:
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 = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = 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::string {aka std::basic_string<char>}' to 'const key_type& {aka const 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 = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = 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::string {aka std::basic_string<char>}' to 'std::map<char, int>::key_type&& {aka char&&}'
|