Borderou de evaluare (job #3225979)

Utilizator vladdobro07vladdd vladdobro07 Data 19 aprilie 2024 15:03:51
Problema Sezon Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void read()': main.cpp:100:21: error: no match for 'operator>>' (operand types are 'InParser' and 'int64_t' {aka 'long int'}) 100 | fin >> last; | ~~~ ^~ ~~~~ | | | | | int64_t {aka long int} | InParser main.cpp:27:19: note: candidate: 'InParser& InParser::operator>>(int&)' (near match) 27 | InParser& operator >> (int &n) { | ^~~~~~~~ main.cpp:27:19: note: conversion of argument 1 would be ill-formed: main.cpp:100:24: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'int64_t' {aka 'long int'} 100 | fin >> last; | ^~~~ main.cpp:44:19: note: candidate: 'InParser& InParser::operator>>(long long int&)' (near match) 44 | InParser& operator >> (long long &n) { | ^~~~~~~~ main.cpp:44:19: note: conversion of argument 1 would be ill-formed: main.cpp:100:24: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int64_t' {aka 'long int'} 100 | fin >> last; | ^~~~ In file included from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:45, from main.cpp:1: /usr/include/c++/12.2.1/cstddef:128:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 128 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/12.2.1/cstddef:128:5: note: template argument deduction/substitution failed: main.cpp:100:17: note: cannot convert 'fin' (type 'InParser') to type 'std::byte' 100 | fin >> last; | ^~~ 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/sstream:38, from /usr/include/c++/12.2.1/complex:45, from /usr/include/c++/12.2.1/ccomplex:39, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54: /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:100:24: note: 'InParser' is not derived from 'std::basic_istream<_CharT, _Traits>' 100 | fin >> last; | ^~~~ 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) | ^~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?