记录详情

Compile Error

foo.c:4:17: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
  int digit[1000]={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:8: error: unknown type name 'num'; did you mean 'enum'?
 int mu(num *x,num *y,num *z)
        ^~~
        enum
foo.c:31:15: error: unknown type name 'num'; did you mean 'enum'?
 int mu(num *x,num *y,num *z)
               ^~~
               enum
foo.c:31:22: error: unknown type name 'num'; did you mean 'enum'?
 int mu(num *x,num *y,num *z)
                      ^~~
                      enum
foo.c: In function 'main':
foo.c:57:2: error: unknown type name 'num'; use 'struct' keyword to refer to the type
  num a,b,c;
  ^~~
  struct 
foo.c:58:3: error: request for member 'n' in something not a structure or union
  a.n=fun(&a,x1,n1);
   ^
foo.c:58:6: warning: implicit declaration of function 'fun' [-Wimplicit-function-declaration]
  a.n=fun(&a,x1,n1);
      ^~~
foo.c:59:3: error: request for member 'n' in something not a structure or union
  b.n=fun(&b,x2,n2); 
   ^
foo.c:60:3: error: request for member 'n' in something not a structure or union
  c.n=mu(&a,&b,&c);
   ^
foo.c:60:6: warning: implicit declaration of function 'mu' [-Wimplicit-function-declaration]
  c.n=mu(&a,&b,&c);
      ^~
foo.c:61:13: error: request for member 'n' in something not a structure or union
  for(int i=c.n-1;i>=0;i--)
             ^
foo.c:63:16: error: request for member 'digit' in something not a structure or union
   printf("%d",c.digit[i]);
                ^
foo.c:56: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-4 高精度整数之间的乘法
比赛
2021(四) 作业第三场:热身赛
语言
C
递交时间
2021-11-15 17:15:47
评测时间
2021-11-15 17:15:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes