Borderou de evaluare (job #1209304)

Utilizator PopescuMihai95Popescu Mihai PopescuMihai95 Data 17 iulie 2014 14:30:50
Problema Reuniune Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:4:12: error: ‘int y1’ redeclared as different kind of symbol int n,i,x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6; ^ 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:10:40: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘double (*)(double)throw ()’ [-Wformat=] scanf("%d %d %d %d",&x1,&y1,&x2,&y2); ^ user.cpp:13:21: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ L1=x2-x1; l1=y2-y1; ^ user.cpp:18:30: error: no matching function for call to ‘max(double (&)(double)throw (), int&)’ x=max(x1,x3); y=max(y1,y3); ^ user.cpp:18:30: 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:18:30: note: deduced conflicting types for parameter ‘const _Tp’ (‘double(double)throw ()’ and ‘int’) x=max(x1,x3); y=max(y1,y3); ^ 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:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: user.cpp:18:30: note: deduced conflicting types for parameter ‘const _Tp’ (‘double(double)throw ()’ and ‘int’) x=max(x1,x3); y=max(y1,y3); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4254:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4254:5: note: template argument deduction/substitution failed: user.cpp:18:30: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘double (*)(double)throw ()’ x=max(x1,x3); y=max(y1,y3); ^ In file included from /usr/include/c++/4.8/algorithm:62:0,

Ceva nu functioneaza?