Problem labs
User Feiyang
Submission Time 2025-06-18 16:52:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

labs.cpp: In function ‘int main()’:
labs.cpp:15:35: error: no matching function for call to ‘std::map<std::__cxx11::basic_string<char>, int>::count(int&)’
15 | int count=m.count(name)
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from labs.cpp:1:
/usr/include/c++/9/bits/stl_map.h:1214:7: note: candidate: ‘std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::count(const key_type&) const [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::size_type = long unsigned int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::__cxx1