Problem labs
User guru1396
Submission Time 2024-12-21 10:19:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

labs.cpp: In function ‘int main()’:
labs.cpp:20:31: error: no matching function for call to ‘std::set<long long int>::count(std::string&)’
20 | } else if (names.count(name)){
| ^
In file included from /usr/include/c++/9/set:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from labs.cpp:1:
/usr/include/c++/9/bits/stl_set.h:748:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::count(const key_type&) const [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = long long int]’
748 | count(const key_type& __x) const
| ^~~~~
/usr/include/c++/9/bits/stl_set.h:748:29: note: no known conversion for argument 1