Borderou de evaluare (job #1201626)

Utilizator alex_bucevschiBucevschi Alexandru alex_bucevschi Data 25 iunie 2014 16:05:27
Problema Reuniune Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:8:19: error: ‘int y1’ redeclared as different kind of symbol int A,P,i,j,x1,x2,y1,y2,l1,l2; ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/cstdio:41, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’ __MATHCALL (y1,, (_Mdouble_)); ^ user.cpp: In function ‘int main()’: user.cpp:27:15: error: assignment of function ‘double y1(double)’ y1=max(d[i].y1,d[j].y1); ^ user.cpp:27:15: error: cannot convert ‘const int’ to ‘double(double)throw ()’ in assignment user.cpp:30:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] l1=y1>y2?y1-y2:y2-y1; ^ user.cpp:30:25: warning: pointer to a function used in arithmetic [-Wpointer-arith] l1=y1>y2?y1-y2:y2-y1; ^ user.cpp:30:31: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ l1=y1>y2?y1-y2:y2-y1; ^ user.cpp:32:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(x2>=x1&&y2>=y1) ^ user.cpp:39:7: error: assignment of function ‘double y1(double)’ y1=max(d[1].y1,d[2].y1); ^ user.cpp:39:7: error: cannot convert ‘const int’ to ‘double(double)throw ()’ in assignment user.cpp:42:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(x2>=x1&&y2>=y1) ^ user.cpp:45:26: error: no matching function for call to ‘max(double (&)(double)throw (), int&)’ y1=max(y1,d[3].y1); ^ user.cpp:45:26: note: candidates are: In file included from /usr/include/c++/4.8/algorithm:61:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: user.cpp:45:26: note: deduced conflicting types for parameter ‘const _Tp’ (‘double(double)throw ()’ and ‘int’) y1=max(y1,d[3].y1); ^ In file included from /usr/include/c++/4.8/algorithm:61:0, from user.cpp:2:

Ceva nu functioneaza?