F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_27914856_22731.cpp: In function 'int main()':
0_0_27914856_22731.cpp:41:4: error: no match for 'operator=' (operand types are 'std::set<int>' and 'void')
   s=s.clear();
    ^
0_0_27914856_22731.cpp:41:4: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from 0_0_27914856_22731.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:263:7: note: std::set<_Key, _Compare, _Alloc>& std::set<_Key, _Compare, _Alloc>::operator=(const std::set<_Key, _Compare, _Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]
       operator=(const set& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:263:7: note:   no known conversion for argument 1 from 'void' to 'const std::set<int>&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:279:7: note: std::set<_Key, _Compare, _Alloc>& std::set<_Key, _Compare, _Alloc>::operator=(std::set<_Key, _Compare, _Alloc>&&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]
       operator=(set&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:279:7: note:   no known conversion for argument 1 from 'void' to 'std::set<int>&&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:305:7: note: std::set<_Key, _Compare, _Alloc>& std::set<_Key, _Compare, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]
       operator=(initializer_list<value_type> __l)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:305:7: note:   no known conversion for argument 1 from 'void' to 'std::initializer_list<int>'


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 06:08:20, Gzip enabled