Borderou de evaluare (job #2170888)
Utilizator | Data | 15 martie 2018 10:14:08 | |
---|---|---|---|
Problema | Elementul majoritar | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:11: error: size of array ‘v’ is too large
int v[nmax];
^
user.cpp: In function ‘int main()’:
user.cpp:17:22: error: ‘v’ was not declared in this scope
scanf("%d", &v[i]);
^
user.cpp:25:25: error: ‘v’ was not declared in this scope
candidate = v[i];
^
user.cpp:27:20: error: ‘v’ was not declared in this scope
} else if (v[i] == candidate) {
^
user.cpp:39:17: error: ‘v’ was not declared in this scope
if (v[i] == candidate) {
^
user.cpp:10:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("carici.in", "r", stdin);
^
user.cpp:15:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !