记录详情

Compile Error

/in/foo.c: In function 'Setlnter':
/in/foo.c:4:12: error: 'n1' undeclared (first use in this function)
  for(int i=n1-1;i>0;i--)
            ^~
/in/foo.c:4:12: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:5:3: error: subscripted value is neither array nor pointer nor vector
  x[i+1]=x[i];
   ^
/in/foo.c:5:10: error: subscripted value is neither array nor pointer nor vector
  x[i+1]=x[i];
          ^
/in/foo.c:6:12: error: 'n2' undeclared (first use in this function)
  for(int j=n2-1;j>0;j--)
            ^~
/in/foo.c:7:4: error: subscripted value is neither array nor pointer nor vector
   y[j+1]=y[j];
    ^
/in/foo.c:7:11: error: subscripted value is neither array nor pointer nor vector
   y[j+1]=y[j];
           ^
/in/foo.c:8:7: error: 'i' undeclared (first use in this function)
  if(x[i]==y[j])
       ^
/in/foo.c:8:13: error: 'j' undeclared (first use in this function)
  if(x[i]==y[j])
             ^
/in/foo.c: In function 'main':
/in/foo.c:16:7: error: conflicting types for 'a1'
  int *a1,*a2,*a3;
       ^~
/in/foo.c:15:9: note: previous declaration of 'a1' was here
     int a1,a2,a3;
         ^~
/in/foo.c:16:11: error: conflicting types for 'a2'
  int *a1,*a2,*a3;
           ^~
/in/foo.c:15:12: note: previous declaration of 'a2' was here
     int a1,a2,a3;
            ^~
/in/foo.c:16:15: error: conflicting types for 'a3'
  int *a1,*a2,*a3;
               ^~
/in/foo.c:15:15: note: previous declaration of 'a3' was here
     int a1,a2,a3;
               ^~
/in/foo.c:18:5: error: 'new' undeclared (first use in this function)
  a1=new int[size];
     ^~~
/in/foo.c:18:9: error: expected ';' before 'int'
  a1=new int[size];
         ^~~
/in/foo.c:19:9: error: expected ';' before 'int'
  a2=new int[size];
         ^~~
/in/foo.c:20:9: error: expected ';' before 'int'
  a3=new int[size];
         ^~~
/in/foo.c:21:2: error: 'delete' undeclared (first use in this function)
  delete []a1;
  ^~~~~~
/in/foo.c:21:10: error: expected expression before ']' token
  delete []a1;
          ^
/in/foo.c:22:10: error: expected expression before ']' token
  delete []a2;
          ^
/in/foo.c:23:10: error: expected expression before ']' token
  delete []a3;
          ^
/in/foo.c:24:11: warning: passing argument 1 of 'Setlnter' makes integer from pointer without a cast [-Wint-conversion]
  Setlnter(a1,a2);
           ^~
/in/foo.c:2:5: note: expected 'int' but argument is of type 'int *'
 int Setlnter(int x,int y,int z)
     ^~~~~~~~
/in/foo.c:24:14: warning: passing argument 2 of 'Setlnter' makes integer from pointer without a cast [-Wint-conversion]
  Setlnter(a1,a2);
              ^~
/in/foo.c:2:5: note: expected 'int' but argument is of type 'int *'
 int Setlnter(int x,int y,int z)
     ^~~~~~~~
/in/foo.c:24:2: error: too few arguments to function 'Setlnter'
  Setlnter(a1,a2);
  ^~~~~~~~
/in/foo.c:2:5: note: declared here
 int Setlnter(int x,int y,int z)
     ^~~~~~~~
/in/foo.c:25:11: warning: passing argument 1 of 'Setlnter' makes integer from pointer without a cast [-Wint-conversion]
  Setlnter(a1,a3);
           ^~
/in/foo.c:2:5: note: expected 'int' but argument is of type 'int *'
 int Setlnter(int x,int y,int z)
     ^~~~~~~~
/in/foo.c:25:14: warning: passing argument 2 of 'Setlnter' makes integer from pointer without a cast [-Wint-conversion]
  Setlnter(a1,a3);
              ^~
/in/foo.c:2:5: note: expected 'int' but argument is of type 'int *'
 int Setlnter(int x,int y,int z)
     ^~~~~~~~
/in/foo.c:25:2: error: too few arguments to function 'Setlnter'
  Setlnter(a1,a3);
  ^~~~~~~~
/in/foo.c:2:5: note: declared here
 int Setlnter(int x,int y,int z)
     ^~~~~~~~
/in/foo.c:17:6: warning: unused variable 'size' [-Wunused-variable]
  int size=100;
      ^~~~
/in/foo.c:14:12: warning: unused variable 'n3' [-Wunused-variable]
  int n1,n2,n3;
            ^~
/in/foo.c:14:9: warning: unused variable 'n2' [-Wunused-variable]
  int n1,n2,n3;
         ^~
/in/foo.c:14:6: warning: unused variable 'n1' [-Wunused-variable]
  int n1,n2,n3;
      ^~

信息

递交者
类型
递交
题目
A10-4 集合的交集
比赛
数据结构课堂练习9-16
语言
C
递交时间
2019-09-16 11:13:48
评测时间
2019-09-16 11:13:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes