记录详情

Compile Error

/in/foo.c:3:23: error: unknown type name 'sum'
 int gethe(int m,int n,sum s);
                       ^~~
/in/foo.c: In function 'main':
/in/foo.c:13:2: error: unknown type name 'sum'
  sum s[100];sum temp;
  ^~~
/in/foo.c:13:2: note: use 'struct' keyword to refer to the type
/in/foo.c:13:13: error: unknown type name 'sum'
  sum s[100];sum temp;
             ^~~
/in/foo.c:13:13: note: use 'struct' keyword to refer to the type
/in/foo.c:16:17: error: request for member 'h' in something not a structure or union
 scanf("%d",&s[i].h);
                 ^
/in/foo.c:17:17: error: request for member 'k' in something not a structure or union
 scanf("%d",&s[i].k);
                 ^
/in/foo.c:21:12: error: request for member 'h' in something not a structure or union
   { if(s[j].h<s[j+1].h)
            ^
/in/foo.c:21:21: error: request for member 'h' in something not a structure or union
   { if(s[j].h<s[j+1].h)
                     ^
/in/foo.c:29:12: error: request for member 'h' in something not a structure or union
  {if(2*s[i].h<=gethe(i,n,s))
            ^
/in/foo.c:29:16: warning: implicit declaration of function 'gethe' [-Wimplicit-function-declaration]
  {if(2*s[i].h<=gethe(i,n,s))
                ^~~~~
/in/foo.c:35:11: error: request for member 'k' in something not a structure or union
   g=g+s[i].k;
           ^
/in/foo.c: At top level:
/in/foo.c:39:23: error: unknown type name 'sum'
 int gethe(int m,int n,sum s)
                       ^~~

信息

递交者
类型
自测
题目
xk-4:摘果子
语言
C
递交时间
2019-03-31 11:35:27
评测时间
2019-03-31 11:35:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes