记录详情

Compile Error

foo.cc: In constructor ‘Vector3::Vector3()’:
foo.cc:10:22: warning: unused variable ‘x’ [-Wunused-variable]
   10 |                 int *x = 0, *y = 0, *z = 0;
      |                      ^
foo.cc:10:30: warning: unused variable ‘y’ [-Wunused-variable]
   10 |                 int *x = 0, *y = 0, *z = 0;
      |                              ^
foo.cc:10:38: warning: unused variable ‘z’ [-Wunused-variable]
   10 |                 int *x = 0, *y = 0, *z = 0;
      |                                      ^
foo.cc: In function ‘std::ostream operator<<(std::ostream&, const Vector3&)’:
foo.cc:61:24: 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>]’
   61 |                 return out;
      |                        ^~~
In file included from iostream:41:
/nix/gcc-13.2.0/include/c++/13.2.0/ostream:438:7: note: declared here
  438 |       basic_ostream(const basic_ostream&) = delete;
      |       ^~~~~~~~~~~~~

信息

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