Borderou de evaluare (job #1352805)
Utilizator | Data | 21 februarie 2015 13:09:14 | |
---|---|---|---|
Problema | Por Costel si Bujor | Status | done |
Runda | ONIS 2015, Runda 1 | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘bool equal(double, double)’:
user.cpp:18:14: error: call of overloaded ‘abs(double)’ is ambiguous
if ( abs(a-b) < eps )
^
user.cpp:18:14: note: candidates are:
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/bits/stl_algo.h:59,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/stdlib.h:771:12: note: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^
user.cpp:11:15: note: double abs(double)
inline double abs ( double j ){
^
In file included from /usr/include/c++/4.8/random:38:0,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/c++/4.8/cmath:91:3: note: constexpr long double std::abs(long double)
abs(long double __x)
^
/usr/include/c++/4.8/cmath:87:3: note: constexpr float std::abs(float)
abs(float __x)
^
/usr/include/c++/4.8/cmath:81:3: note: constexpr double std::abs(double)
abs(double __x)
^
In file included from /usr/include/c++/4.8/bits/stl_algo.h:59:0,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^
/usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^
user.cpp: In function ‘int main()’:
user.cpp:78:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("bujor.in", "r", stdin);
^
user.cpp:79:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("bujor.out", "w", stdout);
^
user.cpp:82:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &tests);
^
user.cpp:84:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n); m = n + n;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !