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_35824040_7273.cpp: In function 'int main()':
0_0_35824040_7273.cpp:21:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
      while(scanf("%d",&n) ==  && n)
                                  ^
0_0_35824040_7273.cpp:25:20: error: no matching function for call to 'std::set<int>::insert()'
          st.insert();
                    ^
0_0_35824040_7273.cpp:25:20: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from 0_0_35824040_7273.cpp:7:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::value_type = int]
       insert(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note:   candidate expects 1 argument, 0 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::value_type = int]
       insert(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note:   candidate expects 1 argument, 0 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::value_type = int]
       insert(const_iterator __position, const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note:   candidate expects 2 arguments, 0 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::value_type = int]
       insert(const_iterator __position, value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note:   candidate expects 2 arguments, 0 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note: template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]
  insert(_InputIterator __first, _InputIterator __last)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note:   template argument deduction/substitution failed:
0_0_35824040_7273.cpp:25:20: note:   candidate expects 2 arguments, 0 provided
          st.insert();
                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from 0_0_35824040_7273.cpp:7:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:568:7: note: void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]
       insert(initializer_list<value_type> __l)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:568:7: note:   candidate expects 1 argument, 0 provided
0_0_35824040_7273.cpp:26:13: error: expected primary-expression before ']' token
          mp[] = ;
             ^
0_0_35824040_7273.cpp:26:17: error: expected primary-expression before ';' token
          mp[] = ;
                 ^
0_0_35824040_7273.cpp:21:34: error: label 'n' used but not defined
      while(scanf("%d",&n) ==  && n)
                                  ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-01-18 15:46:20, Gzip enabled