Compile Error

foo.cc: In function 'int main()':
foo.cc:8:10: error: expected ']' before ',' token
    8 |  int a1[3, a2[3], a3[3], b1[3], b2[3];
      |          ^
      |          ]
foo.cc:10:8: error: 'a1' was not declared in this scope; did you mean 'b1'?
   10 |   cin>>a1[i];
      |        ^~
      |        b1
foo.cc:16:10: error: 'a1' was not declared in this scope; did you mean 'b1'?
   16 |   cout<<(a1[i]+a2[i]-a3[i])*k<<" ";
      |          ^~
      |          b1
foo.cc:19:10: error: 'a1' was not declared in this scope; did you mean 'b1'?
   19 |   cout<<(a1[i]*a2[i]*a3[i])*k<<" ";
      |          ^~
      |          b1
foo.cc:8:26: warning: unused variable 'b1' [-Wunused-variable]
    8 |  int a1[3, a2[3], a3[3], b1[3], b2[3];
      |                          ^~
foo.cc:8:33: warning: unused variable 'b2' [-Wunused-variable]
    8 |  int a1[3, a2[3], a3[3], b1[3], b2[3];
      |                                 ^~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1120 OO4-1 向量类的算术运算符的重载
语言
C++
递交时间
2022-01-17 09:22:54
评测时间
2022-01-17 09:22:54
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes