Borderou de evaluare (job #627131)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Cifre (clasa a 5-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 23 ian. 2022 10:16:37 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:8:13: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [2]')
8 | fin>>nr1>>" ">>nr2>>" ">>nr3;
| ~~~~~~~~^~~~~
| | |
| | const char [2]
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/fstream:38,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:168:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
168 | operator>>(bool& __n)
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:168:7: note: conversion of argument 1 would be ill-formed:
main.cpp:8:15: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'const char*'
8 | fin>>nr1>>" ">>nr2>>" ">>nr3;
| ^~~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/fstream:38,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:172:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
172 | operator>>(short& __n);
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:172:7: note: conversion of argument 1 would be ill-formed:
main.cpp:8:15: error: invalid conversion from 'const char*' to 'short int' [-fpermissive]
8 | fin>>nr1>>" ">>nr2>>" ">>nr3;
| ^~~
| |
| const char*
main.cpp:8:15: error: cannot bind rvalue '(short int)((const char*)" ")' to 'short int&'
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/fstream:38,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:175:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
175 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:175:7: note: conversion of argument 1 would be ill-formed:
main.cpp:8:15: error: invalid conversion from 'const char*' to 'short unsigned int' [-fpermissive]
8 | fin>>nr1>>" ">>nr2>>" ">>nr3;
| ^~~
| |
| const char*
main.cpp:8:15: error: cannot bind rvalue '(short unsigned int)((const char*)" ")' to 'short unsigned int&'
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/fstream:38,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:179:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
179 | operator>>(int& __n);
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/11.2.0/include/g++-v11/istream:179:7: note: conversion of argument 1 would be ill-formed:
main.cpp:8:15: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
8 | fin>>nr1>>" ">>nr2>>" ">>nr3;
| ^~~
| |