Borderou de evaluare (job #691574)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Sumacifre (clasa a 5-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 30 ian. 2023 17:46:32 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:11:14: error: cannot bind non-const lvalue reference of type 'std::basic_istream<char>::char_type&' {aka 'char&'} to a value of type 'int'
11 | fin.get (c);
| ^
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/fstream:38,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/istream:316:22: note: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char]'
316 | get(char_type& __c);
| ~~~~~~~~~~~^~~
main.cpp:14:18: error: cannot bind non-const lvalue reference of type 'std::basic_istream<char>::char_type&' {aka 'char&'} to a value of type 'int'
14 | fin.get (c);
| ^
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/fstream:38,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/istream:316:22: note: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char]'
316 | get(char_type& __c);
| ~~~~~~~~~~~^~~