Borderou de evaluare (job #1948154)

Utilizator mesbotMeszaros Botond mesbot Data 31 martie 2017 19:20:10
Problema NN Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:9:9: error: ‘int y1’ redeclared as different kind of symbol int x1, y1, x2, y2; ^ 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/iostream: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:22:13: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’ fin >> x1 >> y1, alpha.push_back((float)y1 / (float)x1); ^ In file included from /usr/include/c++/4.8/iostream:40: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:22:49: error: invalid cast from type ‘double (*)(double)throw ()’ to type ‘float’ fin >> x1 >> y1, alpha.push_back((float)y1 / (float)x1); ^ user.cpp:30:13: 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/iostream:40: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:21: error: invalid cast from type ‘double (*)(double)throw ()’ to type ‘float’ d1 = (float)y1 / (float)x1, d2 = (float)y2 / (float)x2; ^

Ceva nu functioneaza?