记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:7:8: error: conflicting types for 'a'
    int a,b,c;
        ^
/in/foo.c:5:9: note: previous declaration of 'a' was here
     int a[1000];
         ^
/in/foo.c:8:14: error: 'n' undeclared (first use in this function)
  scanf("%d",&n);
              ^
/in/foo.c:8:14: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:10:15: error: subscripted value is neither array nor pointer nor vector
  scanf("%d",&a[i]);
               ^
/in/foo.c:12:7: error: subscripted value is neither array nor pointer nor vector
  {if(a[i]==3)
       ^
/in/foo.c:14:6: error: subscripted value is neither array nor pointer nor vector
  if(a[i]==4)
      ^
/in/foo.c:16:6: error: subscripted value is neither array nor pointer nor vector
  if(a[i]==3)
      ^
/in/foo.c:21:9: error: subscripted value is neither array nor pointer nor vector
  {  if(a[i]==4)
         ^
/in/foo.c:22:5: error: subscripted value is neither array nor pointer nor vector
    a[i]=2;
     ^
/in/foo.c:23:7: error: subscripted value is neither array nor pointer nor vector
   if(a[i]==2)
       ^
/in/foo.c:24:5: error: subscripted value is neither array nor pointer nor vector
    a[i]=3;
     ^
/in/foo.c:26:7: error: subscripted value is neither array nor pointer nor vector
   if(a[j]==3)
       ^
/in/foo.c:28:6: error: subscripted value is neither array nor pointer nor vector
     a[k-1]=a[k];
      ^
/in/foo.c:28:13: error: subscripted value is neither array nor pointer nor vector
     a[k-1]=a[k];
             ^
/in/foo.c:32:1: error: expected declaration or statement at end of input
 }
 ^
/in/foo.c:6:10: warning: unused variable 'max' [-Wunused-variable]
    int i,max;
          ^~~

信息

递交者
类型
递交
题目
P1190 斯芬克斯
比赛
2020年互联网创新创业科技节程序设计大赛
语言
C
递交时间
2020-12-09 16:59:21
评测时间
2020-12-09 16:59:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes