Borderou de evaluare (job #2012498)

Utilizator mariusn01Marius Nicoli mariusn01 Data 18 august 2017 22:20:03
Problema NN Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:25:21: error: ‘int y1’ redeclared as different kind of symbol int n, m, X, Y, x1, y1, x2, y2, i, k, segmente, s[DIM]; ^ 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/iosfwd:38, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, 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:43:12: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’ fin>>x1>>y1>>x2>>y2; ^ In file included from /usr/include/c++/4.8/fstream:38:0, from user.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = double(double)throw ()]’ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ user.cpp:44:28: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator*’ if (x1 * y2 < x2 * y1) { ^ user.cpp:46:24: error: no matching function for call to ‘swap(double (&)(double)throw (), int&)’ swap(y1, y2); ^ user.cpp:46:24: note: candidates are: In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0, from /usr/include/c++/4.8/bits/stl_algobase.h:64, 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:1: /usr/include/c++/4.8/bits/move.h:166:5: note: template<class _Tp> void std::swap(_Tp&, _Tp&) swap(_Tp& __a, _Tp& __b) ^ /usr/include/c++/4.8/bits/move.h:166:5: note: template argument deduction/substitution failed: user.cpp:46:24: note: deduced conflicting types for parameter ‘_Tp’ (‘double(double)throw ()’ and ‘int’) swap(y1, y2); ^ In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0, from /usr/include/c++/4.8/bits/stl_algobase.h:64, 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,

Ceva nu functioneaza?