/ 晓编程 /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:10:9: error: lvalue required as left operand of assignment
   a*b*c=b;
         ^
foo.cc:11:39: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}' and 'float')
   cout<<fixed<<setprecision(2)<<a*b*c=b;
                                       ^
In file included from /usr/include/c++/6/iostream:39:0,
                 from foo.cc:2:
/usr/include/c++/6/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<char>]
       operator=(basic_ostream&& __rhs)
       ^~~~~~~~
/usr/include/c++/6/ostream:402:7: note:   no known conversion for argument 1 from 'float' to 'std::basic_ostream<char>&&'

自豪的采用jd5进行评测(github.com/masnn/jd5)

信息

递交者
类型
递交
题目
P1020 存很多年的压岁钱
语言
C++
递交时间
2020-02-23 10:03:19
评测时间
2020-02-23 10:03:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes