Problem assistance
User om2024
Submission Time 2024-08-01 15:34:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

assistance.cpp: In function ‘int main()’:
assistance.cpp:9:13: error: no matching function for call to ‘sort(long long int [5], int)’
9 | sort(arr, 5);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from assistance.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:
assistance.cpp:9:13: note: deduced conflicting types for parameter ‘_RAIter’ (‘long long int*’ and ‘int’)
9 | sort(arr, 5);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,