记录详情

Compile Error

/in/foo.cc:4:7: error: storage size of 'a' isn't known
 int a[],n1,t1;
       ^
/in/foo.cc:5:7: error: storage size of 'b' isn't known
 int b[],n2,t2;
       ^
/in/foo.cc: In function 'void FindMax1()':
/in/foo.cc:11:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=0;i<n1;i++)
  ^~~
/in/foo.cc:13:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
   t1++;
   ^~
/in/foo.cc:14:7: error: 'i' was not declared in this scope
  if(a[i]!=0)
       ^
/in/foo.cc: In function 'void FindMax2()':
/in/foo.cc:24:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=0;i<n2;i++)
  ^~~
/in/foo.cc:26:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
   t2++;
   ^~
/in/foo.cc:27:7: error: 'i' was not declared in this scope
  if(b[i]!=0)
       ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:35:10: warning: statement is a reference, not call, to function 'FindMax1' [-Waddress]
  FindMax1;
          ^
/in/foo.cc:35:10: warning: statement has no effect [-Wunused-value]
/in/foo.cc:36:10: warning: statement is a reference, not call, to function 'FindMax2' [-Waddress]
  FindMax2;
          ^
/in/foo.cc:36:10: warning: statement has no effect [-Wunused-value]

信息

递交者
类型
递交
题目
A9-7 数组中所有极大值
比赛
数据结构课堂练习9-16
语言
C++
递交时间
2019-09-16 10:45:50
评测时间
2019-09-16 10:45:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes