Problem descsort
User Johnnie
Submission Time 2023-06-24 20:30:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

descsort.cpp: In function ‘int main()’:
descsort.cpp:12:10: error: no matching function for call to ‘sort(long int [n])’
12 | sort(arr);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from descsort.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: candidate: ‘template<class _RAIter> void std::sort(_RAIter, _RAIter)’
4863 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: template argument deduction/substitution failed:
descsort.cpp:12:10: note: candidate expects 2 arguments, 1 provided
12 | sort(arr);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from descsort.cpp:1:
/usr/include/c++/9/bit