| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 68830 | 杨珞烯 | 04四位数移位 | C++ | Compile Error | 0 MS | 0 KB | 265 | 2024-03-25 21:13:49 |
#include <iostream> using namespace std; int main(){ int a,b,c,d,n; cin >> a=1,b=2,c=3,d=4; n = a,b,c,d; a = n / 1000; b = n / 100 % 10; c = n / 10 % 10; d = n / 1 % 10; n = 1000*b+100*c+10*d+a; cout << n <<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:13: error: no match for 'operator=' (operand types are 'std::basic_istream::__istream_type {aka std::basic_istream}' and 'int')
cin >> a=1,b=2,c=3,d=4;
^
In file included from /usr/include/c++/5/iostream:40:0,
from Main.cc:1:
/usr/include/c++/5/istream:625:7: note: candidate: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator=(std::basic_istream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits]
operator=(basic_istream&& __rhs)
^
/usr/include/c++/5/istream:625:7: note: no known conversion for argument 1 from 'int' to 'std::basic_istream&&'
Main.cc:6:13: warning: right operand of comma operator has no effect [-Wunused-value]
n = a,b,c,d;
^
Main.cc:6:15: warning: right operand of comma operator has no effect [-Wunused-value]
n = a,b,c,d;
^
Main.cc:6:16: warning: right operand of comma operator has no effect [-Wunused-value]
n = a,b,c,d;
^