Borderou de evaluare (job #2220470)

Utilizator berindeiChesa Matei berindei Data 11 iulie 2018 19:24:45
Problema Arie Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In member function ‘void POLIGON::setAria()’: user.cpp:61:48: error: invalid use of non-static member function ‘bool POLIGON::cmp(POINT&, POINT&)’ sort (points.begin(), points.end(), cmp); ^ user.cpp:50:10: note: declared here bool cmp(POINT &a, POINT &b){ ^~~ user.cpp:63:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1; i<points.size(); i++) ~^~~~~~~~~~~~~~ user.cpp:64:59: error: ‘int POINT::det(POINT&, POINT&)’ is private within this context arie+=abs(points[0].det(points[i], points[i-1])); ^ user.cpp:13:9: note: declared private here int det(POINT &a, POINT &b){ ^~~ user.cpp: In member function ‘bool POLIGON::isInside(POINT&)’: user.cpp:72:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1; i<points.size(); i++) ~^~~~~~~~~~~~~~ user.cpp:73:52: error: ‘int POINT::det(POINT&, POINT&)’ is private within this context dummy+=abs(a.det(points[i], points[i-1])); ^ user.cpp:13:9: note: declared private here int det(POINT &a, POINT &b){ ^~~ user.cpp:75:21: warning: suggest parentheses around assignment used as truth value [-Wparentheses] return dummy=arie; ~~~~~^~~~~ user.cpp: In function ‘int main()’: user.cpp:87:15: error: ‘x’ was not declared in this scope in >> x >> y; ^ user.cpp:87:20: error: ‘y’ was not declared in this scope in >> x >> y; ^ user.cpp:94:15: error: ‘x’ was not declared in this scope in >> x >> y; ^ user.cpp:94:20: error: ‘y’ was not declared in this scope in >> x >> y; ^ user.cpp:101:36: error: invalid initialization of non-const reference of type ‘POINT&’ from an rvalue of type ‘POINT’ if (p1.isInside(p2.getPoint(i))){ ~~~~~~~~~~~^~~ user.cpp:70:10: note: initializing argument 1 of ‘bool POLIGON::isInside(POINT&)’ bool isInside(POINT &a){ ^~~~~~~~ user.cpp:102:36: error: invalid initialization of non-const reference of type ‘POINT&’ from an rvalue of type ‘POINT’ pf.addPoint(p2.getPoint(i));

Ceva nu functioneaza?