Compile Error

foo.cc:3:8: error: expected identifier before numeric constant
    3 | int a=[1000],x;
      |        ^~~~
foo.cc: In lambda function:
foo.cc:3:13: error: expected ‘{’ before ‘,’ token
    3 | int a=[1000],x;
      |             ^
foo.cc: At global scope:
foo.cc:3:7: error: invalid user-defined conversion from ‘<lambda()>’ to ‘int’ [-fpermissive]
    3 | int a=[1000],x;
      |       ^~~~~~
foo.cc:3:7: note: candidate is: ‘<lambda()>::operator void (*)()() const’ (near match)
    3 | int a=[1000],x;
      |       ^
foo.cc:3:7: note: no known conversion from ‘void (*)()’ to ‘int’
foo.cc: In function ‘int main()’:
foo.cc:8:15: error: invalid types ‘int[int]’ for array subscript
    8 |         cin>>a[i];
      |               ^
foo.cc:10:16: error: invalid types ‘int[int]’ for array subscript
   10 |         cout<<a[i]<<" ";
      |                ^

信息

递交者
类型
递交
题目
P1003 1.6.4数组逆序重放
语言
C++
递交时间
2026-07-15 18:26:22
评测时间
2026-07-15 18:26:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes