/in/foo.cc:2:16: error: 'node' does not name a type
bool com(const node a,const node b)
^~~~
/in/foo.cc:2:29: error: 'node' does not name a type
bool com(const node a,const node b)
^~~~
/in/foo.cc: In function 'bool com(int, int)':
/in/foo.cc:3:11: error: request for member 'dis' in 'a', which is of non-class type 'const int'
{return a.dis<b.dis;}
^~~
/in/foo.cc:3:17: error: request for member 'dis' in 'b', which is of non-class type 'const int'
{return a.dis<b.dis;}
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:17:11: warning: unused variable 'd' [-Wunused-variable]
int l,n,m,d;
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:71:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = node*; _Iterator2 = node*; _Compare = bool (*)(int, int)]':
/usr/include/c++/6/bits/stl_algo.h:1844:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1882:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1968:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = node*; _Compare = bool (*)(int, int)]'
/in/foo.cc:30:19: required from here
/usr/include/c++/6/bits/predefined_ops.h:125:18: error: cannot convert 'node' to 'int' in argument passing
{ return bool(_M_comp(*__it1, *__it2)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = node; _Iterator = node*; _Compare = bool (*)(int, int)]':
/usr/include/c++/6/bits/stl_algo.h:1825:20: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1852:36: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1882:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1968:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = node*; _Compare = bool (*)(int, int)]'
/in/foo.cc:30:19: required from here
/usr/include/c++/6/bits/predefined_ops.h:173:11: error: cannot convert 'node' to 'int' in argument passing
{ return bool(_M_comp(__val, *__it)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = node*; _Value = node; _Compare = bool (*)(int, int)]':
/usr/include/c++/6/bits/stl_heap.h:129:48: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = node*; _Distance = long int; _Tp = node; _Compare = __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_heap.h:230:23: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = node*; _Distance = long int; _Tp = node; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_heap.h:335:22: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1669:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1930:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1945:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = node*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1965:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = node*; _Compare = bool (*)(int, int)]'
/in/foo.cc:30:19: required from here
/usr/include/c++/6/bits/predefined_ops.h:147:11: error: cannot convert 'node' to 'int' in argument passing
{ return bool(_M_comp(*__it, __val)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~