记录详情

Compile Error

/in/foo.c:20:11: error: expected declaration specifiers or '...' before string constant
   20 |     scanf("%s", str);
      |           ^~~~
/in/foo.c:20:17: error: unknown type name 'str'
   20 |     scanf("%s", str);
      |                 ^~~
/in/foo.c:22:5: warning: data definition has no type or storage class
   22 |     bubbleSort(str);
      |     ^~~~~~~~~~
/in/foo.c:22:5: warning: type defaults to 'int' in declaration of 'bubbleSort' [-Wimplicit-int]
/in/foo.c:22:5: warning: parameter names (without types) in function declaration
/in/foo.c:22:5: error: conflicting types for 'bubbleSort'; have 'int()'
/in/foo.c:5:6: note: previous definition of 'bubbleSort' with type 'void(char *)'
    5 | void bubbleSort(char str[]) {
      |      ^~~~~~~~~~
/in/foo.c:24:12: error: expected declaration specifiers or '...' before string constant
   24 |     printf("%s\n", str);
      |            ^~~~~~
/in/foo.c:24:20: error: unknown type name 'str'
   24 |     printf("%s\n", str);
      |                    ^~~
/in/foo.c:25:5: error: expected identifier or '(' before 'return'
   25 |     return 0;
      |     ^~~~~~
/in/foo.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^

信息

递交者
类型
自测
语言
C
递交时间
2025-12-29 10:17:39
评测时间
2025-12-29 10:17:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes