Borderou de evaluare (job #2784020)
Utilizator | Data | 15 octombrie 2021 16:26:19 | |
---|---|---|---|
Problema | A+B | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:23: warning: multi-character character constant [-Wmultichar]
8 | int a,b; cin >> a >> '/n' >> b >> '/n';
| ^~~~
main.cpp:8:36: warning: multi-character character constant [-Wmultichar]
8 | int a,b; cin >> a >> '/n' >> b >> '/n';
| ^~~~
main.cpp:9:19: warning: multi-character character constant [-Wmultichar]
9 | cout << a + b << '/n';
| ^~~~
main.cpp: In function 'int main()':
main.cpp:8:20: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
8 | int a,b; cin >> a >> '/n' >> b >> '/n';
| ~~~~~~~~ ^~ ~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included from /usr/include/c++/10/fstream:38,
from main.cpp:2:
/usr/include/c++/10/istream:120:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
120 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/10/istream:120:7: note: conversion of argument 1 would be ill-formed:
main.cpp:8:23: error: invalid conversion from 'int' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
8 | int a,b; cin >> a >> '/n' >> b >> '/n';
| ^~~~
| |
| int
In file included from /usr/include/c++/10/fstream:38,
from main.cpp:2:
/usr/include/c++/10/istream:124:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__ios_type& (*)(std::basic_istream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]' (near match)
124 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/10/istream:124:7: note: conversion of argument 1 would be ill-formed:
main.cpp:8:23: error: invalid conversion from 'int' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive]
8 | int a,b; cin >> a >> '/n' >> b >> '/n';
| ^~~~
| |
| int
In file included from /usr/include/c++/10/fstream:38,
from main.cpp:2:
/usr/include/c++/10/istream:131:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
131 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/10/istream:131:7: note: conversion of argument 1 would be ill-formed:
main.cpp:8:23: error: invalid conversion from 'int' to 'std::ios_base& (*)(std::ios_base&)' [-fpermissive]
8 | int a,b; cin >> a >> '/n' >> b >> '/n';
| ^~~~
| |
| int
In file included from /usr/include/c++/10/fstream:38,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !