记录详情

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 3ms 384.0 KiB
#2 Runtime Error Segmentation fault 3ms 384.0 KiB
#3 Runtime Error Segmentation fault 2ms 384.0 KiB
#4 Runtime Error Segmentation fault 4ms 384.0 KiB
#5 Runtime Error Segmentation fault 2ms 384.0 KiB

信息

递交者
类型
递交
题目
P1019 OO4-3 矩阵类的算术运算符的重载
比赛
2022春 面向对象程序设计方法的上机作业
语言
C++
递交时间
2022-05-15 16:03:52
评测时间
2022-05-15 16:03:53
评测机
分数
0
总耗时
16ms
峰值内存
384.0 KiB