Borderou de evaluare (job #3130524)
Utilizator | Data | 17 mai 2023 21:56:34 | |
---|---|---|---|
Problema | Mere | 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:12:10: error: no match for 'operator>>' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
12 | g>> a >> b;
| ~^~ ~
| | |
| | int
| std::ofstream {aka std::basic_ofstream<char>}
main.cpp:12:10: note: candidate: 'operator>>(int, int)' (built-in)
12 | g>> a >> b;
| ~^~~~
main.cpp:12:10: note: no known conversion for argument 1 from 'std::ofstream' {aka 'std::basic_ofstream<char>'} to 'int'
In file included from /usr/include/c++/12.2.1/string:54,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/istream:38,
from /usr/include/c++/12.2.1/fstream:38,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/basic_string.tcc:940:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
940 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/basic_string.tcc:940:5: note: template argument deduction/substitution failed:
main.cpp:12:13: note: 'std::ofstream' {aka 'std::basic_ofstream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | g>> a >> b;
| ^
In file included from /usr/include/c++/12.2.1/istream:1016:
/usr/include/c++/12.2.1/bits/istream.tcc:960:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
960 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/istream.tcc:960:5: note: template argument deduction/substitution failed:
main.cpp:12:13: note: 'std::ofstream' {aka 'std::basic_ofstream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | g>> a >> b;
| ^
/usr/include/c++/12.2.1/istream:756:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
756 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/12.2.1/istream:756:5: note: template argument deduction/substitution failed:
main.cpp:12:13: note: 'std::ofstream' {aka 'std::basic_ofstream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | g>> a >> b;
| ^
/usr/include/c++/12.2.1/istream:761:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
761 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/12.2.1/istream:761:5: note: template argument deduction/substitution failed:
main.cpp:12:13: note: 'std::ofstream' {aka 'std::basic_ofstream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | g>> a >> b;
| ^
/usr/include/c++/12.2.1/istream:859:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Num> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT (&)[_Num])'
859 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT (&__s)[_Num])
| ^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !