Borderou de evaluare (job #2302479)
Utilizator | Data | 14 decembrie 2018 18:25:03 | |
---|---|---|---|
Problema | Elicoptere | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'double Dot::distx(Dot, Dot)':
main.cpp:26:29: error: call of overloaded 'abs(double)' is ambiguous
return min(abs(a.y - y), abs(b.y - y));
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from main.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from main.cpp:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
main.cpp:26:43: error: call of overloaded 'abs(double)' is ambiguous
return min(abs(a.y - y), abs(b.y - y));
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from main.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from main.cpp:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
main.cpp:27:75: error: call of overloaded 'abs(double)' is ambiguous
return abs((b.x * a.y - a.x * b.y - x * (a.y - b.y)) / (b.x - a.x) - y);
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/bits/stl_algo.h:59,
from /usr/include/c++/6/algorithm:62,
from main.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !