记录详情

Compile Error

/in/foo.cc:20:24: error: duplicate 'const'
  Complex(const Complex const* pObj)
                        ^~~~~
/in/foo.cc: In function 'std::ostream operator<<(std::ostream&, const Complex&)':
/in/foo.cc:45:10: error: 'std::basic_ostream<_CharT, _Traits>::basic_ostream(const std::basic_ostream<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is protected within this context
   return out;
          ^~~
In file included from /usr/include/c++/6/iostream:39:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/ostream:391:7: note: declared protected here
       basic_ostream(const basic_ostream&) = delete;
       ^~~~~~~~~~~~~
/in/foo.cc:45:10: error: use of deleted function 'std::basic_ostream<_CharT, _Traits>::basic_ostream(const std::basic_ostream<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]'
   return out;
          ^~~
In file included from /usr/include/c++/6/iostream:39:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/ostream:391:7: note: declared here
       basic_ostream(const basic_ostream&) = delete;
       ^~~~~~~~~~~~~

信息

递交者
类型
递交
题目
P1012 OO2-2 复数类的比较运算符重载
比赛
2024春 面向对象的程序设计方法(第2场作业赛)
语言
C++
递交时间
2024-04-06 16:07:41
评测时间
2024-04-06 16:07:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes