记录详情

Compile Error

foo.c:4:18: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
  int digit[10000]={0};
                  ^
foo.c:7:10: error: unknown type name 'num'; did you mean 'enum'?
 void mul(num *p,int x)
          ^~~
          enum
foo.c:22:9: error: unknown type name 'num'; did you mean 'enum'?
 int fun(num *p,int x,int n)//存x的n次方 
         ^~~
         enum
foo.c:31:10: error: unknown type name 'num'; did you mean 'enum'?
 void Add(num *p1,num *p2, num *pAns)
          ^~~
          enum
foo.c:31:18: error: unknown type name 'num'; did you mean 'enum'?
 void Add(num *p1,num *p2, num *pAns)
                  ^~~
                  enum
foo.c:31:27: error: unknown type name 'num'; did you mean 'enum'?
 void Add(num *p1,num *p2, num *pAns)
                           ^~~
                           enum
foo.c: In function 'main':
foo.c:59:2: error: unknown type name 'num'; use 'struct' keyword to refer to the type
  num a,b,c;
  ^~~
  struct 
foo.c:60:3: error: request for member 'n' in something not a structure or union
  a.n=fun(&a,x1,n1);
   ^
foo.c:60:6: warning: implicit declaration of function 'fun' [-Wimplicit-function-declaration]
  a.n=fun(&a,x1,n1);
      ^~~
foo.c:61:3: error: request for member 'n' in something not a structure or union
  b.n=fun(&b,x2,n2);
   ^
foo.c:62:2: warning: implicit declaration of function 'Add' [-Wimplicit-function-declaration]
  Add(&a,&b,&c);
  ^~~
foo.c:63:13: error: request for member 'n' in something not a structure or union
  for(int i=c.n-1;i>=0;i--)
             ^
foo.c:65:16: error: request for member 'digit' in something not a structure or union
   printf("%d",c.digit[i]);
                ^
foo.c:58:18: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  int x1,n1,x2,n2;scanf("%d%d%d%d",&x1,&n1,&x2,&n2);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A11-3 高精度整数的加法
比赛
2021(四) 作业第三场:热身赛
语言
C
递交时间
2021-11-15 17:09:26
评测时间
2021-11-15 17:09:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes