| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149356 | xyc | 02买礼物 | C++ | Compile Error | 0 MS | 0 KB | 102 | 2026-03-09 17:22:43 |
#include <iostream> using namespace std; int main(){ int a=1000,b=220; cout<<1000-4*220=120; }
Main.cc: In function 'int main()':
Main.cc:5:17: error: no match for 'operator=' (operand types are 'std::basic_ostream' and 'int')
cout<<1000-4*220=120;
^
In file included from /usr/include/c++/5/iostream:39:0,
from Main.cc:1:
/usr/include/c++/5/ostream:402:7: note: candidate: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits]
operator=(basic_ostream&& __rhs)
^
/usr/include/c++/5/ostream:402:7: note: no known conversion for argument 1 from 'int' to 'std::basic_ostream&&'
Main.cc:4:5: warning: unused variable 'a' [-Wunused-variable]
int a=1000,b=220;
^
Main.cc:4:12: warning: unused variable 'b' [-Wunused-variable]
int a=1000,b=220;
^