记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:77:25: error: no match for 'operator*' (operand types are 'Vector3' and 'Matrix3')
   77 |     Vector3 result2 = v * m;
      |                       ~ ^ ~
      |                       |   |
      |                       |   Matrix3
      |                       Vector3
foo.cc:18:13: note: candidate: 'Vector3 Vector3::operator*(const int&) const'
   18 |     Vector3 operator*(const int& scalar) const {
      |             ^~~~~~~~
foo.cc:18:34: note:   no known conversion for argument 1 from 'Matrix3' to 'const int&'
   18 |     Vector3 operator*(const int& scalar) const {
      |                       ~~~~~~~~~~~^~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1020 OO4-4 矩阵类与向量类的算术运算符重载
语言
C++
递交时间
2023-12-21 13:54:25
评测时间
2023-12-21 13:54:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes