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_38657593_12819.cpp:17:23: error: 'EDGE' does not name a type; did you mean 'EGDE'?
  bool operator<(const EDGE &x)const
                       ^~~~
                       EGDE
0_0_38657593_12819.cpp: In member function 'int EGDE::EDGE(int, int, double)':
0_0_38657593_12819.cpp:16:29: error: only constructors take member initializers
  EDGE(int u,int v,double w):u(u),v(v),w(w){}
                             ^
0_0_38657593_12819.cpp: In member function 'bool EGDE::operator<(const int&) const':
0_0_38657593_12819.cpp:19:14: error: request for member 'w' in 'x', which is of non-class type 'const int'
   return w<x.w;
              ^
0_0_38657593_12819.cpp: In function 'int Find(int)':
0_0_38657593_12819.cpp:24:9: error: 'father' was not declared in this scope
  return father[x]==x?x:father[x]=Find(father[x]);
         ^~~~~~
0_0_38657593_12819.cpp: In function 'void Union(int, int)':
0_0_38657593_12819.cpp:28:10: error: invalid conversion from 'int (*)(int)' to 'int' [-fpermissive]
  u=Find[u],v=Find[v];
    ~~~~~~^
0_0_38657593_12819.cpp:28:20: error: invalid conversion from 'int (*)(int)' to 'int' [-fpermissive]
  u=Find[u],v=Find[v];
              ~~~~~~^
0_0_38657593_12819.cpp: At global scope:
0_0_38657593_12819.cpp:30:20: error: expected ')' before 'S'
 int check_dis(point S,point E)
              ~     ^~
                    )
0_0_38657593_12819.cpp:30:28: error: expected ')' before 'E'
 int check_dis(point S,point E)
              ~             ^~
                            )
0_0_38657593_12819.cpp:30:30: error: expression list treated as compound expression in initializer [-fpermissive]
 int check_dis(point S,point E)
                              ^
0_0_38657593_12819.cpp:30:30: error: invalid conversion from 'point*' to 'int' [-fpermissive]
0_0_38657593_12819.cpp:31:1: error: expected ',' or ';' before '{' token
 {
 ^
0_0_38657593_12819.cpp: In function 'int main()':
0_0_38657593_12819.cpp:51:43: error: 'check_dis' cannot be used as a function
     double dis=check_dis(point[i],point[j]);
                                           ^
0_0_38657593_12819.cpp:53:10: error: 'EDGE' was not declared in this scope
     e[i]=EDGE(i,j,dis);
          ^~~~
0_0_38657593_12819.cpp:53:10: note: suggested alternative: 'EGDE'
     e[i]=EDGE(i,j,dis);
          ^~~~
          EGDE
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:71,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/char_traits.h:39,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38657593_12819.cpp:1:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = EGDE*; _Iterator2 = EGDE*]':
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algo.h:1847:14:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = EGDE*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algo.h:1885:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = EGDE*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algo.h:1971:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = EGDE*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algo.h:4834:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = EGDE*]'
0_0_38657593_12819.cpp:56:13:   required from here
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/predefined_ops.h:43:23: error: no match for 'operator<' (operand types are 'EGDE' and 'EGDE')
       { return *__it1 < *__it2; }
                ~~~~~~~^~~~~~~~
0_0_38657593_12819.cpp:17:7: note: candidate: 'bool EGDE::operator<(const int&) const'
  bool operator<(const EDGE &x)const
       ^~~~~~~~
0_0_38657593_12819.cpp:17:7: note:   no known conversion for argument 1 from 'EGDE' to 'const int&'
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:67,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/char_traits.h:39,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38657593_12819.cpp:1:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator.h:892:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)'
     operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
     ^~~~~~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator.h:892:5: note:   template argument deduction/substitution failed:
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:71,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/char_traits.h:39,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38657593_12819.cpp:1:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/predefined_ops.h:43:23: note:   'EGDE' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
       { return *__it1 < *__it2; }
                ~~~~~~~^~~~~~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:67,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/char_traits.h:39,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38657593_12819.cpp:1:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator.h:899:5: note: candidate: 'template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)'
     operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
     ^~~~~~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator.h:899:5: note:   template argument deduction/substitution failed:
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:71,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/char_traits.h:39,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38657593_12819.cpp:1:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/predefined_ops.h:43:23: note:   'EGDE' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
       { return *__it1 < *__it2; }
                ~~~~~~~^~~~~~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&) const [with _Iterator = EGDE*; _Value = EGDE]':
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_heap.h:133:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = EGDE*; _Distance = long long int; _Tp = EGDE; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_heap.h:237:23:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = EGDE*; _Distance = long long int; _Tp = EGDE; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_heap.h:342:22:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = EGDE*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algo.h:1672:23:   required from 'void std:


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-12-02 13:10:31, Gzip enabled