Borderou de evaluare (job #2897949)
Utilizator | Data | 5 mai 2022 14:51:26 | |
---|---|---|---|
Problema | Ghicit | 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:38:23: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::basic_istream<char>')
38 | s = getline(cin, s);
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from main.cpp:1:
/usr/include/c++/10/bits/basic_string.h:665:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
665 | operator=(const basic_string& __str)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:665:37: note: no known conversion for argument 1 from 'std::basic_istream<char>' to 'const std::__cxx11::basic_string<char>&'
665 | operator=(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/bits/basic_string.h:675:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
675 | operator=(const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:675:31: note: no known conversion for argument 1 from 'std::basic_istream<char>' to 'const char*'
675 | operator=(const _CharT* __s)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/basic_string.h:686:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
686 | operator=(_CharT __c)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:686:24: note: no known conversion for argument 1 from 'std::basic_istream<char>' to 'char'
686 | operator=(_CharT __c)
| ~~~~~~~^~~
/usr/include/c++/10/bits/basic_string.h:703:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
703 | operator=(basic_string&& __str)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:703:32: note: no known conversion for argument 1 from 'std::basic_istream<char>' to 'std::__cxx11::basic_string<char>&&'
703 | operator=(basic_string&& __str)
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/bits/basic_string.h:766:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
766 | operator=(initializer_list<_CharT> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:766:42: note: no known conversion for argument 1 from 'std::basic_istream<char>' to 'std::initializer_list<char>'
766 | operator=(initializer_list<_CharT> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !