Borderou de evaluare (job #2983995)
Utilizator | Data | 23 februarie 2023 13:13:27 | |
---|---|---|---|
Problema | Sortare prin comparare | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:37: error: 'v' has not been declared
6 | void mergesort(int left, int right, v[])
| ^
main.cpp: In function 'void mergesort(int, int, int*)':
main.cpp:9:5: error: 'mid' was not declared in this scope
9 | mid=(left+right)/2;
| ^~~
main.cpp:10:24: error: 'v' was not declared in this scope
10 | mergesort(left,mid,v[]);
| ^
main.cpp:10:26: error: expected primary-expression before ']' token
10 | mergesort(left,mid,v[]);
| ^
main.cpp:11:29: error: expected primary-expression before ']' token
11 | mergesort(mid+1,right,v[]);
| ^
main.cpp:27:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
27 | for (;i<=mid;i++)
| ^~~
main.cpp:29:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
29 | for (;j<=right;j++)
| ^~~
main.cpp: At global scope:
main.cpp:37:1: error: expected declaration before '}' token
37 | }
| ^
main.cpp: In function 'int main()':
main.cpp:45:13: warning: unused variable 'cnt' [-Wunused-variable]
45 | int n,i,cnt=1;
| ^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !