Problem cards
User JJ1234
Submission Time 2024-12-14 11:20:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cards.cpp:5:21: error: ‘arr’ does not name a type
5 | bool isSorted(const arr[]){
| ^~~
cards.cpp: In function ‘bool isSorted(const int*)’:
cards.cpp:6:25: error: ‘arr’ was not declared in this scope
6 | for (int i = 1; i < arr.size(); i++)
| ^~~
cards.cpp: In function ‘int main()’:
cards.cpp:24:14: error: cannot convert ‘long long int*’ to ‘const int*’
24 | if(isSorted(arr) == false){
| ^~~
| |
| long long int*
cards.cpp:5:15: note: initializing argument 1 of ‘bool isSorted(const int*)’
5 | bool isSorted(const arr[]){
| ^~~~~~~~~~~