记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:6: warning: 'main' is normally a non-static function [-Wmain]
    5 |  int main()
      |      ^~~~
foo.c: In function 'main':
foo.c:8:14: error: 'MAXS' undeclared (first use in this function)
    8 |  char str1 [ MAXS+MAXS] = { '\0'}, str2[ MAXS] = { '0'};
      |              ^~~~
foo.c:8:14: note: each undeclared identifier is reported only once for each function it appears in
foo.c:9:2: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |  scanf("%s%s", str1, str2);
      |  ^~~~~
foo.c:9:2: warning: incompatible implicit declaration of built-in function 'scanf'
foo.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include <string.h>
  +++ |+#include <stdio.h>
    2 | int main()
foo.c:10:2: error: stray '\343' in program
   10 |  、,
      |  ^
foo.c:10:3: error: stray '\200' in program
   10 |  、,
      |   ^
foo.c:10:4: error: stray '\201' in program
   10 |  、,
      |    ^
foo.c:10:5: error: expected expression before ',' token
   10 |  、,
      |     ^
foo.c:10:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
foo.c:14:20: error: stray '\357' in program
   14 |  scanf("%s%s", str1,str2);
      |                    ^
foo.c:14:21: error: stray '\274' in program
   14 |  scanf("%s%s", str1,str2);
      |                     ^
foo.c:14:22: error: stray '\214' in program
   14 |  scanf("%s%s", str1,str2);
      |                      ^
foo.c:15:47: error: stray '\357' in program
   15 |  p = str_cat(str1, str2);printf("%s \n%s\n", p, str1);
      |                                               ^
foo.c:15:48: error: stray '\274' in program
   15 |  p = str_cat(str1, str2);printf("%s \n%s\n", p, str1);
      |                                                ^
foo.c:15:49: error: stray '\214' in program
   15 |  p = str_cat(str1, str2);printf("%s \n%s\n", p, str1);
      |                                                 ^
foo.c:16:2: error: expected declaration or statement at end of input
   16 |  return 0;
      |  ^~~~~~
foo.c:8:36: warning: unused variable 'str2' [-Wunused-variable]
    8 |  char str1 [ MAXS+MAXS] = { '\0'}, str2[ MAXS] = { '0'};
      |                                    ^~~~
foo.c:8:7: warning: unused variable 'str1' [-Wunused-variable]
    8 |  char str1 [ MAXS+MAXS] = { '\0'}, str2[ MAXS] = { '0'};
      |       ^~~~
foo.c:7:8: warning: unused variable 'p' [-Wunused-variable]
    7 |  char *p;
      |        ^
foo.c: In function 'main':
foo.c:16:2: error: expected declaration or statement at end of input
   16 |  return 0;
      |  ^~~~~~
At top level:
foo.c:5:6: warning: 'main' defined but not used [-Wunused-function]
    5 |  int main()
      |      ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A9-5 数组中最小值的个数
语言
C
递交时间
2021-12-23 23:44:49
评测时间
2021-12-23 23:44:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes