Borderou de evaluare (job #2744474)

Utilizator MihaelaDanilaDanila Mihaela MihaelaDanila Data 24 aprilie 2021 18:54:11
Problema Muzica Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:14:25: error: no matching function for call to 'std::set<long int>::set(int)' set <long> melodii(10000); ^ In file included from /usr/include/c++/6/set:61:0, from main.cpp:3: /usr/include/c++/6/bits/stl_set.h:252:9: note: candidate: template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const allocator_type&) set(_InputIterator __first, _InputIterator __last, ^~~ /usr/include/c++/6/bits/stl_set.h:252:9: note: template argument deduction/substitution failed: main.cpp:14:25: note: candidate expects 3 arguments, 1 provided set <long> melodii(10000); ^ In file included from /usr/include/c++/6/set:61:0, from main.cpp:3: /usr/include/c++/6/bits/stl_set.h:246:7: note: candidate: std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const allocator_type&) [with _Key = long int; _Compare = std::less<long int>; _Alloc = std::allocator<long int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<long int>] set(initializer_list<value_type> __l, const allocator_type& __a) ^~~ /usr/include/c++/6/bits/stl_set.h:246:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/6/bits/stl_set.h:240:7: note: candidate: std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&, const allocator_type&) [with _Key = long int; _Compare = std::less<long int>; _Alloc = std::allocator<long int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<long int>] set(set&& __x, const allocator_type& __a) ^~~ /usr/include/c++/6/bits/stl_set.h:240:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/6/bits/stl_set.h:236:7: note: candidate: std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&, const allocator_type&) [with _Key = long int; _Compare = std::less<long int>; _Alloc = std::allocator<long int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<long int>] set(const set& __x, const allocator_type& __a) ^~~ /usr/include/c++/6/bits/stl_set.h:236:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/6/bits/stl_set.h:232:7: note: candidate: std::set<_Key, _Compare, _Alloc>::set(const allocator_type&) [with _Key = long int; _Compare = std::less<long int>; _Alloc = std::allocator<long int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<long int>] set(const allocator_type& __a) ^~~ /usr/include/c++/6/bits/stl_set.h:232:7: note: no known conversion for argument 1 from 'int' to 'const allocator_type& {aka const std::allocator<long int>&}' /usr/include/c++/6/bits/stl_set.h:224:7: note: candidate: std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const _Compare&, const allocator_type&) [with _Key = long int; _Compare = std::less<long int>; _Alloc = std::allocator<long int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<long int>] set(initializer_list<value_type> __l, ^~~ /usr/include/c++/6/bits/stl_set.h:224:7: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<long int>' /usr/include/c++/6/bits/stl_set.h:210:7: note: candidate: std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&) [with _Key = long int; _Compare = std::less<long int>; _Alloc = std::allocator<long int>] set(set&& __x) ^~~ /usr/include/c++/6/bits/stl_set.h:210:7: note: no known conversion for argument 1 from 'int' to 'std::set<long int>&&' /usr/include/c++/6/bits/stl_set.h:199:7: note: candidate: std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&) [with _Key = long int; _Compare = std::less<long int>; _Alloc = std::allocator<long int>] set(const set& __x) ^~~ /usr/include/c++/6/bits/stl_set.h:199:7: note: no known conversion for argument 1 from 'int' to 'const std::set<long int>&' /usr/include/c++/6/bits/stl_set.h:186:2: note: candidate: template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const _Compare&, const allocator_type&) set(_InputIterator __first, _InputIterator __last, ^~~ /usr/include/c++/6/bits/stl_set.h:186:2: note: template argument deduction/substitution failed: main.cpp:14:25: note: candidate expects 4 arguments, 1 provided set <long> melodii(10000); ^ In file included from /usr/include/c++/6/set:61:0, Non zero exit status: 1

Ceva nu functioneaza?