记录详情

Compile Error

/in/foo.cc: In constructor 'Vector3::Vector3()':
/in/foo.cc:11:8: warning: unused variable 'x' [-Wunused-variable]
   int *x = 0, *y = 0, *z = 0;
        ^
/in/foo.cc:11:16: warning: unused variable 'y' [-Wunused-variable]
   int *x = 0, *y = 0, *z = 0;
                ^
/in/foo.cc:11:24: warning: unused variable 'z' [-Wunused-variable]
   int *x = 0, *y = 0, *z = 0;
                        ^
/in/foo.cc: In function 'std::ostream operator<<(std::ostream&, const Vector3&)':
/in/foo.cc:32: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:32: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;
       ^~~~~~~~~~~~~

信息

递交者
类型
递交
题目
P1018 OO4-2 向量的比较、赋值及向量集合类的排序
比赛
2024春 面向对象的程序设计方法(第2场作业赛)
语言
C++
递交时间
2024-04-06 17:19:28
评测时间
2024-04-06 17:19:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes