Problem sort
User dayeetmaster
Submission Time 2024-02-07 19:31:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:6:6: error: conflicting declaration ‘int arr []’
6 | int arr[];
| ^~~
sort.cpp:4:10: note: previous declaration as ‘int arr’
4 | int n,k,arr;
| ^~~
sort.cpp:8:13: error: invalid types ‘int[int]’ for array subscript
8 | cin>>arr[i];
| ^
sort.cpp:13:14: error: invalid types ‘int[int]’ for array subscript
13 | cout<<arr[i]<<" ";
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from sort.cpp:1:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’:
/usr/include/c++/9/bits/stl_algo.h:1890:25: required from ‘void std::__final_ins