Main.cc: In function ‘int main()’: Main.cc:10:9: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] gets(a);//带有空格的输入串的方法 ^ In file included from /usr/include/stdio.h:862:0, from /usr/include/c++/7/cstdio:42, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:46, from Main.cc:2: /usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here gets (char *__str) ^~~~ Main.cc:11:8: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] gets(b); ^ In file included from /usr/include/stdio.h:862:0, from /usr/include/c++/7/cstdio:42, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:46, from Main.cc:2: /usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here gets (char *__str) ^~~~ Main.cc:13:2: error: ‘strlwr’ was not declared in this scope strlwr(a);//大写变小写 strupr 小写变大写 ^~~~~~ Main.cc:13:2: note: suggested alternative: ‘strstr’ strlwr(a);//大写变小写 strupr 小写变大写 ^~~~~~ strstr Main.cc:10:7: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(a);//带有空格的输入串的方法 ~~~~^~~ Main.cc:11:6: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(b); ~~~~^~~