记录详情

Compile Error

foo.c: In function 'gcd':
foo.c:6:5: error: 'res' undeclared (first use in this function)
    6 |     res = a % b;
      |     ^~~
foo.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c: In function 'main':
foo.c:32:12: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   32 |         b =free(a[j], b);
      |            ^~~~
foo.c:32:12: warning: incompatible implicit declaration of built-in function 'free'
foo.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'free'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | #define A 1000
foo.c:32:18: warning: passing argument 1 of 'free' makes pointer from integer without a cast [-Wint-conversion]
   32 |         b =free(a[j], b);
      |                 ~^~~
      |                  |
      |                  int
foo.c:32:18: note: expected 'void *' but argument is of type 'int'
foo.c:32:12: error: too many arguments to function 'free'
   32 |         b =free(a[j], b);
      |            ^~~~
foo.c:32:11: error: void value not ignored as it ought to be
   32 |         b =free(a[j], b);
      |           ^
foo.c:18:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   18 |     scanf("%d", &n);
      |     ^~~~~~~~~~~~~~~
foo.c:21:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   21 |         scanf("%d", &a[i]);
      |         ^~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A6-4 最大公约数专题:多个数的最大公约数
语言
C
递交时间
2021-12-16 23:05:35
评测时间
2021-12-16 23:05:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes