记录详情

Runtime Error

foo.cc: In function 'Matrix3& operator+(Matrix3&, Matrix3&)':
foo.cc:34:9: warning: reference to local variable 'tmp' returned [-Wreturn-local-addr]
   34 |  return tmp;
      |         ^~~
foo.cc:28:10: note: declared here
   28 |  Matrix3 tmp;
      |          ^~~
foo.cc: In function 'Matrix3& operator-(Matrix3&, Matrix3&)':
foo.cc:43:9: warning: reference to local variable 'tmp' returned [-Wreturn-local-addr]
   43 |  return tmp;
      |         ^~~
foo.cc:37:10: note: declared here
   37 |  Matrix3 tmp;
      |          ^~~
foo.cc: In function 'Matrix3& operator*(Matrix3&, int)':
foo.cc:52:9: warning: reference to local variable 'tmp' returned [-Wreturn-local-addr]
   52 |  return tmp;
      |         ^~~
foo.cc:46:10: note: declared here
   46 |  Matrix3 tmp;
      |          ^~~
foo.cc: In function 'Matrix3& operator*(Matrix3&, Matrix3&)':
foo.cc:61:9: warning: reference to local variable 'tmp' returned [-Wreturn-local-addr]
   61 |  return tmp;
      |         ^~~
foo.cc:55:10: note: declared here
   55 |  Matrix3 tmp;
      |          ^~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 5ms 384.0 KiB

信息

递交者
类型
自测
题目
P1019 OO4-3 矩阵类的算术运算符的重载
语言
C++
递交时间
2022-05-15 15:54:29
评测时间
2022-05-15 15:54:29
评测机
分数
0
总耗时
5ms
峰值内存
384.0 KiB