记录详情

Compile Error

foo.c:2:5: warning: conflicting types for built-in function 'strlen'; expected 'long unsigned int(const char *)' [-Wbuiltin-declaration-mismatch]
    2 | int strlen(char s[])
      |     ^~~~~~
foo.c:2:1: note: 'strlen' is declared in header '<string.h>'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int strlen(char s[])
foo.c:10:5: warning: conflicting types for built-in function 'strcat'; expected 'char *(char *, const char *)' [-Wbuiltin-declaration-mismatch]
   10 | int strcat(char t[],char s[])
      |     ^~~~~~
foo.c:10:5: note: 'strcat' is declared in header '<string.h>'
foo.c: In function 'strcat':
foo.c:15:11: error: 'i' undeclared (first use in this function)
   15 |         t[i+tlen-1]=0;
      |           ^
foo.c:15:11: note: each undeclared identifier is reported only once for each function it appears in
foo.c:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A8-4 字符串的连接函数
语言
C
递交时间
2023-12-05 14:59:29
评测时间
2023-12-05 14:59:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes