Problem uniquenumbers
User ATHY
Submission Time 2024-06-18 21:04:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

uniquenumbers.cpp: In function ‘int main()’:
uniquenumbers.cpp:13:7: error: invalid use of non-static member function ‘std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int]’
13 | cout << set.size;
| ~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/9/set:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from uniquenumbers.cpp:1:
/usr/include/c++/9/bits/stl_set.h:419:7: note: declared here
419 | size() const _GLIBCXX_NOEXCEPT
| ^~~~