foo.cc: In function 'int main()':
foo.cc:15:14: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
     gets(str1);
              ^
In file included from /usr/include/stdio.h:862:0,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
 gets (char *__str)
 ^~~~
foo.cc:16:14: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
     gets(str2);
              ^
In file included from /usr/include/stdio.h:862:0,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
 gets (char *__str)
 ^~~~
foo.cc:17:14: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
     gets(str3);
              ^
In file included from /usr/include/stdio.h:862:0,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
 gets (char *__str)
 ^~~~
foo.cc:13:10: warning: unused variable 'change' [-Wunused-variable]
     char change[MAXSIZE];
          ^~~~~~
foo.cc: In function 'void str_replace(char*, char*, char*)':
foo.cc:28:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i = 0; i < strlen(str1); i += gap)
                ~~^~~~~~~~~~~~~~
foo.cc:33:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(j = i, k = 0; k < strlen(str2); j++, k++)
                               ~~^~~~~~~~~~~~~~
foo.cc:44:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for(j = i + strlen(str2), k = 0; j < strlen(str1); j++, k++){ // 保存原字符串中剩余的字符
                                                  ~~^~~~~~~~~~~~~~
foo.cc:48:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for(j = i, k = 0; k < strlen(str3); j++, k++)
                                   ~~^~~~~~~~~~~~~~
foo.cc:53:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for(k = 0; k < strlen(temp); j++, k++)
                            ~~^~~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:15:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
     gets(str1);
     ~~~~^~~~~~
foo.cc:16:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
     gets(str2);
     ~~~~^~~~~~
foo.cc:17:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
     gets(str3);
     ~~~~^~~~~~
/tmp/ccFQcIm8.o: In function `main':
foo.cc:(.text.startup+0x3a): warning: the `gets' function is dangerous and should not be used.
   
  
    [Hydro](https://hydro.ac)提供评测服务