记录详情

Compile Error

/in/foo.c:9:11: error: unknown type name 'BD'
 void swap(BD *a, BD *b)  ;
           ^~
/in/foo.c:9:18: error: unknown type name 'BD'
 void swap(BD *a, BD *b)  ;
                  ^~
/in/foo.c:10:16: error: unknown type name 'BD'
 void quicksort(BD bd[], int n, int begin, int end);
                ^~
/in/foo.c:11:17: error: unknown type name 'BD'
 void quicksort2(BD bd[], int n, int begin, int end);
                 ^~
/in/foo.c: In function 'main':
/in/foo.c:18:2: error: unknown type name 'BD'; use 'struct' keyword to refer to the type
  BD bd[100000];
  ^~
  struct 
/in/foo.c:22:20: error: request for member 'id' in something not a structure or union
   scanf("%d",&bd[i].id);
                    ^
/in/foo.c:23:20: error: request for member 'grade' in something not a structure or union
   scanf("%d",&bd[i].grade);
                    ^
/in/foo.c:25:2: warning: implicit declaration of function 'quicksort' [-Wimplicit-function-declaration]
  quicksort(bd,n,0,n-1);
  ^~~~~~~~~
/in/foo.c:29:14: error: request for member 'grade' in something not a structure or union
   grade=bd[i].grade;
              ^
/in/foo.c:31:16: error: request for member 'grade' in something not a structure or union
   while(bd[i+j].grade==grade)
                ^
/in/foo.c:34:4: warning: implicit declaration of function 'quicksort2' [-Wimplicit-function-declaration]
    quicksort2(bd,j+1,i,i+j);
    ^~~~~~~~~~
/in/foo.c:36:24: error: request for member 'id' in something not a structure or union
  printf("%d %d",bd[k-1].id,bd[k-1].grade);
                        ^
/in/foo.c:36:35: error: request for member 'grade' in something not a structure or union
  printf("%d %d",bd[k-1].id,bd[k-1].grade);
                                   ^
/in/foo.c: At top level:
/in/foo.c:40:11: error: unknown type name 'BD'
 void swap(BD *a, BD *b)
           ^~
/in/foo.c:40:18: error: unknown type name 'BD'
 void swap(BD *a, BD *b)
                  ^~
/in/foo.c:49:16: error: unknown type name 'BD'
 void quicksort(BD bd[], int n, int begin, int end)
                ^~
/in/foo.c:81:17: error: unknown type name 'BD'
 void quicksort2(BD bd[], int n, int begin, int end)
                 ^~

信息

递交者
类型
递交
题目
2-1 比赛榜单
比赛
南师大2018年蓝桥杯热身赛
语言
C
递交时间
2018-12-12 14:53:18
评测时间
2018-12-12 14:53:32
评测机
分数
0
总耗时
14ms
峰值内存
3.035 MiB