Problem descsort
User ToiletBrIcker
Submission Time 2024-06-19 09:31:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

descsort.cpp: In function ‘int main()’:
descsort.cpp:11:8: error: ‘arr’ was not declared in this scope; did you mean ‘Arr’?
11 | if (arr[j] < arr[j + 1]) swap(arr[j], arr[j + 1]);
| ^~~
| Arr
descsort.cpp:11:29: error: ‘swap’ was not declared in this scope
11 | if (arr[j] < arr[j + 1]) swap(arr[j], arr[j + 1]);
| ^~~~
descsort.cpp:11:29: note: suggested alternatives:
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from descsort.cpp:1:
/usr/include/c++/9/bits/basic_string.h:6381:5: note: ‘std::swap’
6381 | swap(basic_string<_CharT, _Traits, _Alloc>