Borderou de evaluare (job #1673345)

Utilizator depevladVlad Dumitru-Popescu depevlad Data 3 aprilie 2016 17:59:49
Problema Portal3 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:10:16: error: ‘int y1 [5]’ redeclared as different kind of symbol int x1[5], y1[5], x2[5], y2[5], c[5]; ^ 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 getd(int, int)’: user.cpp:14:48: warning: pointer to a function used in arithmetic [-Wpointer-arith] return abs(x2[i] - x1[j]) + abs(y2[i] - y1[j]) + c[j]; ^ user.cpp:14:48: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ user.cpp: In function ‘int main()’: user.cpp:29:11: warning: pointer to a function used in arithmetic [-Wpointer-arith] y1[4] = y2[4] = m; ^ user.cpp:29:13: error: assignment of read-only location ‘*(y1 + 4u)’ y1[4] = y2[4] = m; ^ user.cpp:29:13: error: cannot convert ‘int’ to ‘double(double)throw ()’ in assignment user.cpp:30:26: warning: pointer to a function used in arithmetic [-Wpointer-arith] in >> x1[1] >> y1[1] >> x2[1] >> y2[1] >> c[1]; ^ user.cpp:30:10: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’ in >> x1[1] >> y1[1] >> x2[1] >> y2[1] >> c[1]; ^ 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:31:26: warning: pointer to a function used in arithmetic [-Wpointer-arith] in >> x1[2] >> y1[2] >> x2[2] >> y2[2] >> c[2]; ^ user.cpp:31:10: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’ in >> x1[2] >> y1[2] >> x2[2] >> y2[2] >> c[2]; ^ 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:32:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]

Ceva nu functioneaza?