Borderou de evaluare (job #702978)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Case (clasa a 5-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 8 mar. 2023 18:39:11 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:21:10: error: no match for 'operator<<' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
21 | fout << nr << '\n';
| ~~~~ ^~ ~~
| | |
| | int
| std::ifstream {aka std::basic_ifstream<char>}
main.cpp:21:10: note: candidate: 'operator<<(int, int)' (built-in)
21 | fout << nr << '\n';
| ~~~~~^~~~~
main.cpp:21:10: note: no known conversion for argument 1 from 'std::ifstream' {aka 'std::basic_ifstream<char>'} to 'int'
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/string:55,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/locale_classes.h:40,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/ios_base.h:41,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ios:42,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ostream:38,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/iostream:39,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/basic_string.h:6531: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>&)'
6531 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/basic_string.h:6531:5: note: template argument deduction/substitution failed:
main.cpp:21:13: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
21 | fout << nr << '\n';
| ^~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/ios_base.h:46,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ios:42,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ostream:38,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/iostream:39,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/system_error:279:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)'
279 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/system_error:279:5: note: template argument deduction/substitution failed:
main.cpp:21:13: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
21 | fout << nr << '\n';
| ^~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/iostream:39,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ostream:513:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)'
513 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ostream:513:5: note: template argument deduction/substitution failed:
main.cpp:21:13: note: 'std::ifstream' {aka 'std::basic_ifstream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
21 | fout << nr << '\n';
| ^~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/iostream:39,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ostream:518:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)'
518 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)