0_0_17817919_3108.cpp: In function 'int main()':
0_0_17817919_3108.cpp:43:4: error: 'flag' was not declared in this scope
flag=0;
^
0_0_17817919_3108.cpp:45:25: error: no matching function for call to 'std::map<std::basic_string<char>, int>::find(int [21])'
if(mp.find(a)==mp.end())
^
0_0_17817919_3108.cpp:45:25: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_17817919_3108.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:859:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(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>::iterator = std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
find(const key_type& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:859:7: note: no known conversion for argument 1 from 'int [21]' to 'const key_type& {aka const std::basic_string<char>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:874:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const key_type&) const [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>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
find(const key_type& __x) const
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:874:7: note: no known conversion for argument 1 from 'int [21]' to 'const key_type& {aka const std::basic_string<char>&}'
0_0_17817919_3108.cpp:48:7: error: no match for 'operator[]' (operand types are 'std::map<std::basic_string<char>, int>' and 'int [21]')
mp[a]=cnt;
^
0_0_17817919_3108.cpp:48:7: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_17817919_3108.cpp:5:
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 'int [21]' 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 'int [21]' to 'std::map<std::basic_string<char>, int>::key_type&& {aka std::basic_string<char>&&}'
0_0_17817919_3108.cpp:52:16: error: no matching function for call to 'std::map<std::basic_string<char>, int>::find(int [21])'
if(mp.find(b)==mp.end())
^
0_0_17817919_3108.cpp:52:16: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_17817919_3108.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:859:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(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>::iterator = std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
find(const key_type& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:859:7: note: no known conversion for argument 1 from 'int [21]' to 'const key_type& {aka const std::basic_string<char>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:874:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const key_type&) const [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>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::basic_string<char>]
find(const key_type& __x) const
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:874:7: note: no known conversion for argument 1 from 'int [21]' to 'const key_type& {aka const std::basic_string<char>&}'
0_0_17817919_3108.cpp:55:7: error: no match for 'operator[]' (operand types are 'std::map<std::basic_string<char>, int>' and 'int [21]')
mp[b]=cnt;
^
0_0_17817919_3108.cpp:55:7: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_17817919_3108.cpp:5:
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 'int [21]' 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 'int [21]' to 'std::map<std::basic_string<char>, int>::key_type&& {aka std::basic_string<char>&&}'
0_0_17817919_3108.cpp:59:12: error: no match for 'operator[]' (operand types are 'std::map<std::basic_string<char>, int>' and 'int [21]')
merge(mp[a],mp[b]);
^
0_0_17817919_3108.cpp:59:12: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
from 0_0_17817919_3108.cpp:5:
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 'int [21]' 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 'int [21]' to 'std::map<std::basic_string<char>, int>::key_type&& {aka std::basic_string<char>&&}'
0_0_17817919_3108.cpp:59:18: error: no match for 'operator[]' (operand types are 'std::map<std::basic_string<char>, int>' and 'int [21]')
mer
|