Compile Error

foo.cc: In function 'int main()':
foo.cc:8:13: warning: right operand of comma operator has no effect [-Wunused-value]
    8 |  cin>>n[1],i;
      |             ^
foo.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |  for(i=1,i<=n;i++)
      |             ^
foo.cc:9:11: warning: right operand of comma operator has no effect [-Wunused-value]
    9 |  for(i=1,i<=n;i++)
      |          ~^~~
foo.cc:9:18: error: expected ';' before ')' token
    9 |  for(i=1,i<=n;i++)
      |                  ^
      |                  ;
foo.cc:11:7: error: 'sum' was not declared in this scope
   11 |   n+1=sum
      |       ^~~
foo.cc:13:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |  for(i=1;i<=n;i++)
      |             ^
foo.cc:15:5: error: 'x' was not declared in this scope
   15 |   f[x[i]]++;
      |     ^
foo.cc:17:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |  for(i=1;i<=n;i++)
      |             ^
foo.cc:5:13: warning: unused variable 'x1' [-Wunused-variable]
    5 |  int flag=0,x1,max=0,i;
      |             ^~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1063 中间值
语言
C++
递交时间
2022-05-09 16:15:53
评测时间
2022-05-09 16:15:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes