Borderou de evaluare (job #3128329)
Utilizator | Data | 9 mai 2023 12:19:44 | |
---|---|---|---|
Problema | Paranteze | 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:17:19: error: no match for 'operator>>' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type' {aka 'char*'})
17 | f >> s[i];
In file included from /usr/include/c++/12.2.1/iostream:40,
from main.cpp:1:
/usr/include/c++/12.2.1/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>; __istream_type = std::basic_istream<char>]' (near match)
168 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/12.2.1/istream:168:7: note: conversion of argument 1 would be ill-formed:
main.cpp:17:25: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type '__gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type' {aka 'char*'}
17 | f >> s[i];
| ^
/usr/include/c++/12.2.1/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/include/c++/12.2.1/istream:172:7: note: conversion of argument 1 would be ill-formed:
main.cpp:17:25: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type' {aka 'char*'} to 'short int' [-fpermissive]
17 | f >> s[i];
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type {aka char*}
main.cpp:17:25: error: cannot bind rvalue '(short int)s.std::vector<char*>::operator[](((std::vector<char*>::size_type)i))' to 'short int&'
/usr/include/c++/12.2.1/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>; __istream_type = std::basic_istream<char>]' (near match)
175 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/12.2.1/istream:175:7: note: conversion of argument 1 would be ill-formed:
main.cpp:17:25: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type' {aka 'char*'} to 'short unsigned int' [-fpermissive]
17 | f >> s[i];
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type {aka char*}
main.cpp:17:25: error: cannot bind rvalue '(short unsigned int)s.std::vector<char*>::operator[](((std::vector<char*>::size_type)i))' to 'short unsigned int&'
/usr/include/c++/12.2.1/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/include/c++/12.2.1/istream:179:7: note: conversion of argument 1 would be ill-formed:
main.cpp:17:25: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type' {aka 'char*'} to 'int' [-fpermissive]
17 | f >> s[i];
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type {aka char*}
main.cpp:17:25: error: cannot bind rvalue '(int)s.std::vector<char*>::operator[](((std::vector<char*>::size_type)i))' to 'int&'
/usr/include/c++/12.2.1/istream:182:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
182 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/12.2.1/istream:182:7: note: conversion of argument 1 would be ill-formed:
main.cpp:17:25: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char*>, char*>::value_type' {aka 'char*'} to 'unsigned int' [-fpermissive]
17 | f >> s[i];
| ^
| |
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !