Borderou de evaluare (job #2096795)

Utilizator PRGCRRaul Cotar PRGCR Data 29 decembrie 2017 20:11:40
Problema Cautare binara Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:15:13: error: ‘x’ was not declared in this scope in>>x; ^ user.cpp:20:18: error: ‘x’ was not declared in this scope in>>tip>>x; ^ user.cpp:23:20: error: no match for ‘operator<<’ (operand types are ‘std::ifstream {aka std::basic_ifstream<char>}’ and ‘int’) out<<-1; ^ user.cpp:23:20: note: candidates are: In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2753:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) operator<<(basic_ostream<_CharT, _Traits>& __os, ^ /usr/include/c++/4.8/bits/basic_string.h:2753:5: note: template argument deduction/substitution failed: user.cpp:23:23: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ out<<-1; ^ In file included from /usr/include/c++/4.8/iostream:39:0, from user.cpp:1: /usr/include/c++/4.8/ostream:471:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT) operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) ^ /usr/include/c++/4.8/ostream:471:5: note: template argument deduction/substitution failed: user.cpp:23:23: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ out<<-1; ^ In file included from /usr/include/c++/4.8/iostream:39:0, from user.cpp:1: /usr/include/c++/4.8/ostream:476:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char) operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) ^ /usr/include/c++/4.8/ostream:476:5: note: template argument deduction/substitution failed: user.cpp:23:23: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ out<<-1; ^ In file included from /usr/include/c++/4.8/iostream:39:0, from user.cpp:1: /usr/include/c++/4.8/ostream:482:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char) operator<<(basic_ostream<char, _Traits>& __out, char __c) ^ /usr/include/c++/4.8/ostream:482:5: note: template argument deduction/substitution failed: user.cpp:23:23: note: ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’

Ceva nu functioneaza?