foo.cc: In function 'bool cp(st, st)':
foo.cc:9:24: error: 'struct st' has no member named 'sim'; did you mean 'sum'?
9 | return x.sum>y.sum||x.sim==y.sum&&x.c>y.c||x.sim==y.sum&&x.c=y.c&&x.n<y.n;
| ^~~
| sum
foo.cc:9:47: error: 'struct st' has no member named 'sim'; did you mean 'sum'?
9 | return x.sum>y.sum||x.sim==y.sum&&x.c>y.c||x.sim==y.sum&&x.c=y.c&&x.n<y.n;
| ^~~
| sum
foo.cc: In function 'int main()':
foo.cc:22:10: error: 'i' was not declared in this scope
22 | for(i=1;i<=5;i++)
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = st*; _Iterator2 = st*]':
/usr/include/c++/9/bits/stl_algo.h:1852:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1890:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1976:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = st*]'
foo.cc:21:20: required from here
/usr/include/c++/9/bits/predefined_ops.h:43:23: error: no match for 'operator<' (operand types are 'st' and 'st')
43 | { return *__it1 < *__it2; }
| ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator.h:912: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>&)'
912 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:912:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/predefined_ops.h:43:23: note: 'st' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
43 | { return *__it1 < *__it2; }
| ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator.h:919: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>&)'
919 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:919:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/predefined_ops.h:43:23: note: 'st' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
43 | { return *__it1 < *__it2; }
| ~~~~~~~^~~~~~~~
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_less_iter::operator()(_Value&, _Iterator) const [with _Value = st; _Iterator = st*]':
/usr/include/c++/9/bits/stl_algo.h:1833:20: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Val_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1860:36: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1890:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1976:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = st*]'
foo.cc:21:20: required from here
/usr/include/c++/9/bits/predefined_ops.h:90:22: error: no match for 'operator<' (operand types are 'st' and 'st')
90 | { return __val < *__it; }
| ~~~~~~^~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator.h:912: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>&)'
912 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:912:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/predefined_ops.h:90:22: note: 'st' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
90 | { return __val < *__it; }
| ~~~~~~^~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator.h:919: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>&)'
919 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:919:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/predefined_ops.h:90:22: note: 'st' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
90 | { return __val < *__it; }
| ~~~~~~^~~~~~~
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&) const [with _Iterator = st*; _Value = st]':
/usr/include/c++/9/bits/stl_heap.h:133:48: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = st*; _Distance = long int; _Tp = st; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
/usr/include/c++/9/bits/stl_heap.h:237:23: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = st*; _Distance = long int; _Tp = st; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_heap.h:342:22: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1677:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1938:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1953:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = st*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1973:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = st*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = st*]'
foo.cc:21:20: required from here
/usr/include/c++/9/bits/predefined_ops.h:65:22: error: no match for 'operator<' (operand types are 'st' and 'st')
65 | { return *__it < __val; }
| ~~~~~~^~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator.h:912: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>&)'
912 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:912:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/predefined_ops.h:65:22: note: 'st' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
65 | { return *__it < __val; }
| ~~~~~~^~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_iterator.h:919: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>&)'
919 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:919:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/predefined_ops.h:65:22: note: 'st' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
65 | { return *__it < __val; }
| ~~~~~~^~~~~~~