foo.c: In function 'Replace':
foo.c:10:9: warning: implicit declaration of function 'Find' [-Wimplicit-function-declaration]
10 | pos = Find(s1,pos, s2); // 在s1中,从s1[pos]开始,找s2的起始位置
| ^~~~
foo.c:12:3: warning: implicit declaration of function 'Replace1'; did you mean 'Replace'? [-Wimplicit-function-declaration]
12 | Replace1(s1,pos, s2,s3); // 将s1[pos]...s1[?]中的s2,替换为s3;
| ^~~~~~~~
| Replace
foo.c: In function 'main':
foo.c:20:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
20 | gets(s1);
| ^~~~
In file included from /usr/include/stdio.h:867,
from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.c:21:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
21 | gets(s2);
| ^~~~
In file included from /usr/include/stdio.h:867,
from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.c:22:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
22 | gets(s3);
| ^~~~
In file included from /usr/include/stdio.h:867,
from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.c:20:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
20 | gets(s1);
| ^~~~~~~~
foo.c:21:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
21 | gets(s2);
| ^~~~~~~~
foo.c:22:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
22 | gets(s3);
| ^~~~~~~~
/usr/bin/ld: /tmp/ccDRRUFE.o: in function `main':
foo.c:(.text.startup+0x3c): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: /tmp/ccDRRUFE.o: in function `Replace':
foo.c:(.text+0x2e): undefined reference to `Replace1'
/usr/bin/ld: foo.c:(.text+0x3e): undefined reference to `Find'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务