记录详情

Compile Error

foo.c:8:10: error: unknown type name 'BigInt'; did you mean 'int'?
 void Mul(BigInt *p, int x);
          ^~~~~~
          int
foo.c:9:13: error: unknown type name 'BigInt'; did you mean 'int'?
 void Output(BigInt x);
             ^~~~~~
             int
foo.c: In function 'main':
foo.c:14:2: error: unknown type name 'BigInt'; use 'struct' keyword to refer to the type
  BigInt x1;
  ^~~~~~
  struct 
foo.c:15:4: error: request for member 'n' in something not a structure or union
  x1.n=1; x1.digit[0]=1;   
    ^
foo.c:15:12: error: request for member 'digit' in something not a structure or union
  x1.n=1; x1.digit[0]=1;   
            ^
foo.c:16:22: warning: implicit declaration of function 'Mul' [-Wimplicit-function-declaration]
  for(i=1; i<=n; i++) Mul(&x1,x);
                      ^~~
foo.c:17:2: error: unknown type name 'BigInt'; use 'struct' keyword to refer to the type
  BigInt x2;
  ^~~~~~
  struct 
foo.c:20:3: warning: implicit declaration of function 'Output' [-Wimplicit-function-declaration]
   Output(x1);
   ^~~~~~
foo.c:25:15: error: request for member 'n' in something not a structure or union
   for(i=0;i<x1.n ;i++)
               ^
foo.c:27:12: error: request for member 'digit' in something not a structure or union
    int y=x1.digit [i]+jw;
            ^
foo.c:28:6: error: request for member 'digit' in something not a structure or union
    x2.digit [i]=y%k;
      ^
foo.c:31:5: error: request for member 'n' in something not a structure or union
   x2.n = i;
     ^
foo.c:34:6: error: request for member 'digit' in something not a structure or union
    x2.digit [x2.n ++] = jw%k;
      ^
foo.c:34:16: error: request for member 'n' in something not a structure or union
    x2.digit [x2.n ++] = jw%k;
                ^
foo.c: At top level:
foo.c:43:10: error: unknown type name 'BigInt'; did you mean 'int'?
 void Mul(BigInt *p, int x)
          ^~~~~~
          int
foo.c:58:13: error: unknown type name 'BigInt'; did you mean 'int'?
 void Output(BigInt x)
             ^~~~~~
             int
foo.c: In function 'main':
foo.c:13:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d %d",&x,&n,&k);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A11-2 K进制的高精度整数
比赛
2021(四) 作业第三场:热身赛
语言
C
递交时间
2021-11-14 15:49:30
评测时间
2021-11-14 15:49:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes