Problem | swapsort |
---|---|
User | YH |
Submission Time | 2024-02-01 19:31:13 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
swapsort.cpp: In function ‘bool checkSorted(int)’:
swapsort.cpp:7:10: error: invalid types ‘int[int]’ for array subscript
7 | if (p[e] > p[e+1]) {
| ^
swapsort.cpp:7:19: error: invalid types ‘int[int]’ for array subscript
7 | if (p[e] > p[e+1]) {
| ^
swapsort.cpp: In function ‘int main()’:
swapsort.cpp:39:19: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
39 | if (checkSorted(p)) {
| ^
| |
| int*
swapsort.cpp:4:22: note: initializing argument 1 of ‘bool checkSorted(int)’
4 | bool checkSorted(int p) {
| ~~~~^