Borderou de evaluare (job #1385925)
Utilizator | Data | 12 martie 2015 16:01:16 | |
---|---|---|---|
Problema | Robot2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘double d(point, point, point)’:
user.cpp:22:68: warning: left operand of comma operator has no effect [-Wunused-value]
if(p.x < min(a.x, b.x) || p.x > max(a.x, b.x) || p.y < (a.y, b.y) || p.y > (a.y, b.y)) {
^
user.cpp:22:88: warning: left operand of comma operator has no effect [-Wunused-value]
if(p.x < min(a.x, b.x) || p.x > max(a.x, b.x) || p.y < (a.y, b.y) || p.y > (a.y, b.y)) {
^
user.cpp:25:34: error: cannot convert ‘std::pair<int, point>’ to ‘double’ in return
return make_pair(m, a);
^
user.cpp:27:30: error: cannot convert ‘std::pair<int, point>’ to ‘double’ in return
return make_pair(n, b);
^
user.cpp:29:52: error: no matching function for call to ‘make_pair(double)’
return make_pair(area(p, a, b) * 2 / dist(a, b));
^
user.cpp:29:52: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
user.cpp:29:52: note: candidate expects 2 arguments, 1 provided
return make_pair(area(p, a, b) * 2 / dist(a, b));
^
user.cpp: In function ‘int main()’:
user.cpp:49:48: error: conversion from ‘double’ to non-scalar type ‘std::pair<double, point>’ requested
pair<double, point> dp = d(P, p, p1);
^
user.cpp: In function ‘double d(point, point, point)’:
user.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !