记录详情

Compile Error

foo.cc:4:5: error: conflicting declaration 'int n [1005]'
    4 | int n[1005];
      |     ^
foo.cc:3:5: note: previous declaration as 'int n'
    3 | int n,i,pi,qi;
      |     ^
foo.cc:5:5: error: conflicting declaration 'int i [1005]'
    5 | int i[1005];
      |     ^
foo.cc:3:7: note: previous declaration as 'int i'
    3 | int n,i,pi,qi;
      |       ^
foo.cc:6:5: error: conflicting declaration 'int pi [1005]'
    6 | int pi[1005];
      |     ^~
foo.cc:3:9: note: previous declaration as 'int pi'
    3 | int n,i,pi,qi;
      |         ^~
foo.cc:7:5: error: conflicting declaration 'int qi [1005]'
    7 | int qi[1005];
      |     ^~
foo.cc:3:12: note: previous declaration as 'int qi'
    3 | int n,i,pi,qi;
      |            ^~
foo.cc: In function 'int main()':
foo.cc:12:21: error: expected primary-expression before ')' token
   12 |         for(int i=0;)
      |                     ^
foo.cc:12:21: error: expected ';' before ')' token
   12 |         for(int i=0;)
      |                     ^
      |                     ;
foo.cc:12:17: warning: unused variable 'i' [-Wunused-variable]
   12 |         for(int i=0;)
      |                 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1505 1. Accommodation
比赛
2023秋 苏州青少年科技馆(吴江计算机协会)CSP-J/S模拟赛(1)
语言
C++
递交时间
2023-10-07 19:49:55
评测时间
2023-10-07 19:49:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes