记录详情

Compile Error

foo.c:6:13: error: unknown type name 'BigInt'; did you mean 'int'?
 void Output(BigInt *p);
             ^~~~~~
             int
foo.c:7:9: error: unknown type name 'BigInt'; did you mean 'int'?
 int Mul(BigInt *p,int x);
         ^~~~~~
         int
foo.c:8:10: error: unknown type name 'BigInt'; did you mean 'int'?
 void Add(BigInt *p1,BigInt *p2,BigInt *pAns);
          ^~~~~~
          int
foo.c:8:21: error: unknown type name 'BigInt'; did you mean 'int'?
 void Add(BigInt *p1,BigInt *p2,BigInt *pAns);
                     ^~~~~~
                     int
foo.c:8:32: error: unknown type name 'BigInt'; did you mean 'int'?
 void Add(BigInt *p1,BigInt *p2,BigInt *pAns);
                                ^~~~~~
                                int
foo.c: In function 'main':
foo.c:11:2: error: unknown type name 'BigInt'; use 'struct' keyword to refer to the type
  BigInt x1,x2;
  ^~~~~~
  struct 
foo.c:12:4: error: request for member 'digit' in something not a structure or union
  x1.digit[0]=1,x2.digit[0]=1,x1.n=1,x2.n=1;
    ^
foo.c:12:18: error: request for member 'digit' in something not a structure or union
  x1.digit[0]=1,x2.digit[0]=1,x1.n=1,x2.n=1;
                  ^
foo.c:12:15: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  x1.digit[0]=1,x2.digit[0]=1,x1.n=1,x2.n=1;
               ^
foo.c:12:32: error: request for member 'n' in something not a structure or union
  x1.digit[0]=1,x2.digit[0]=1,x1.n=1,x2.n=1;
                                ^
foo.c:12:29: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  x1.digit[0]=1,x2.digit[0]=1,x1.n=1,x2.n=1;
                             ^
foo.c:12:39: error: request for member 'n' in something not a structure or union
  x1.digit[0]=1,x2.digit[0]=1,x1.n=1,x2.n=1;
                                       ^
foo.c:12:36: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  x1.digit[0]=1,x2.digit[0]=1,x1.n=1,x2.n=1;
                                    ^
foo.c:13:26: error: request for member 'n' in something not a structure or union
  for(int i=1;i<=b;i++) x1.n=Mul(&x1,a);
                          ^
foo.c:13:29: warning: implicit declaration of function 'Mul' [-Wimplicit-function-declaration]
  for(int i=1;i<=b;i++) x1.n=Mul(&x1,a);
                             ^~~
foo.c:14:26: error: request for member 'n' in something not a structure or union
  for(int i=1;i<=d;i++) x2.n=Mul(&x2,c);
                          ^
foo.c:16:2: error: unknown type name 'BigInt'; use 'struct' keyword to refer to the type
  BigInt x3;
  ^~~~~~
  struct 
foo.c:17:2: warning: implicit declaration of function 'Add' [-Wimplicit-function-declaration]
  Add(&x1,&x2,&x3);
  ^~~
foo.c:18:2: warning: implicit declaration of function 'Output' [-Wimplicit-function-declaration]
  Output(&x3); 
  ^~~~~~
foo.c: At top level:
foo.c:20:9: error: unknown type name 'BigInt'; did you mean 'int'?
 int Mul(BigInt *p,int x){//将当前p乘x
         ^~~~~~
         int
foo.c:33:10: error: unknown type name 'BigInt'; did you mean 'int'?
 void Add(BigInt *p1,BigInt *p2,BigInt *pAns){
          ^~~~~~
          int
foo.c:33:21: error: unknown type name 'BigInt'; did you mean 'int'?
 void Add(BigInt *p1,BigInt *p2,BigInt *pAns){
                     ^~~~~~
                     int
foo.c:33:32: error: unknown type name 'BigInt'; did you mean 'int'?
 void Add(BigInt *p1,BigInt *p2,BigInt *pAns){
                                ^~~~~~
                                int
foo.c:54:13: error: unknown type name 'BigInt'; did you mean 'int'?
 void Output(BigInt *p){
             ^~~~~~
             int
foo.c: In function 'main':
foo.c:10:14: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  int a,b,c,d;scanf("%d%d%d%d",&a,&b,&c,&d);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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