Borderou de evaluare (job #2906485)

Utilizator alexdvResiga Alexandru alexdv Data 26 mai 2022 11:04:14
Problema Parantezare Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:39:18: error: no match for 'operator<<' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int') 39 | fout << match_pos << ' '; | ~~~~ ^~ ~~~~~~~~~ | | | | | int | std::ifstream {aka std::basic_ifstream<char>} main.cpp:39:18: note: candidate: 'operator<<(int, int)' (built-in) 39 | fout << match_pos << ' '; | ~~~~~^~~~~~~~~~~~ main.cpp:39:18: note: no known conversion for argument 1 from 'std::ifstream' {aka 'std::basic_ifstream<char>'} to 'int' In file included from /usr/include/c++/10/string:55, from /usr/include/c++/10/bits/locale_classes.h:40, from /usr/include/c++/10/bits/ios_base.h:41, from /usr/include/c++/10/ios:42, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/bits/basic_string.h:6468:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 6468 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/10/bits/basic_string.h:6468:5: note: template argument deduction/substitution failed: main.cpp:39:21: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 39 | fout << match_pos << ' '; | ^~~~~~~~~ In file included from /usr/include/c++/10/bits/ios_base.h:46, from /usr/include/c++/10/ios:42, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/system_error:262:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)' 262 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/10/system_error:262:5: note: template argument deduction/substitution failed: main.cpp:39:21: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 39 | fout << match_pos << ' '; | ^~~~~~~~~ In file included from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/ostream:506:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)' 506 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/10/ostream:506:5: note: template argument deduction/substitution failed: main.cpp:39:21: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 39 | fout << match_pos << ' '; | ^~~~~~~~~ In file included from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/ostream:511:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)' 511 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) Non zero exit status: 1

Ceva nu functioneaza?