Borderou de evaluare (job #1532763)
Utilizator | Data | 21 noiembrie 2015 16:13:23 | |
---|---|---|---|
Problema | Por Costel și Jocul | Status | done |
Runda | FMI No Stress 6 | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:75:50: error: invalid initialization of non-const reference of type ‘fract&’ from an rvalue of type ‘fract’
prob = add(prob, mult(p[i], p[j]));
^
user.cpp:33:7: error: in passing argument 2 of ‘fract add(fract&, fract&)’
fract add(fract& f1, fract& f2) {
^
user.cpp:50:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("porcjoc.in", "r", stdin);
^
user.cpp:51:40: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("porcjoc.out", "w", stdout);
^
user.cpp:54:22: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &n);
^
user.cpp:59:45: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld %lld", &b[i].v, &b[i].p);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !