记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:17: error: expected unqualified-id before '[' token
    6 |     int i,j,t,a,[N]={2,5,3};
      |                 ^
foo.cc:8:17: error: 'for\U0000ff08j' was not declared in this scope
    8 |                 for(j=0;j<N-1-i;j++)
      |                 ^~~~~~
foo.cc:7:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    7 |         for(i=0;i<N;i++)
      |         ^~~
foo.cc:8:26: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    8 |                 for(j=0;j<N-1-i;j++)
      |                          ^
foo.cc:8:27: warning: statement has no effect [-Wunused-value]
    8 |                 for(j=0;j<N-1-i;j++)
      |                          ~^~~~~~
foo.cc:8:37: error: expected ';' before ')' token
    8 |                 for(j=0;j<N-1-i;j++)
      |                                     ^
      |                                     ;
foo.cc:16:30: error: invalid types 'int[int]' for array subscript
   16 |                 printf("%d",a[i]);
      |                              ^
foo.cc:6:13: warning: unused variable 't' [-Wunused-variable]
    6 |     int i,j,t,a,[N]={2,5,3};
      |             ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A1-1 分支结构练习:三数排序
比赛
2022年迎新赛(第一场)
语言
C++
递交时间
2022-08-15 19:32:43
评测时间
2022-08-15 19:32:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes