Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
98326 | Kevin | 31忽略大小写的字符串比较 | C++ | Compile Error | 0 MS | 0 KB | 274 | 2024-11-19 14:13:46 |
#include<bits/stdc++.h> #include<cstdio> using namespace std; int main(){ char a[100],b[100]; gets(a); gets(b); strlwr(a); strlwr(b); if(strcmp(a,b)>0) { cout<<">"; } else if(strcmp(a,b)==0) { cout<<"="; } else cout<<"<"; return 0; }
Main.cc: In function 'int main()': Main.cc:6:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations] gets(a); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from Main.cc:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ Main.cc:6:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations] gets(a); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from Main.cc:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ Main.cc:6:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations] gets(a); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from Main.cc:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ Main.cc:7:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations] gets(b); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from Main.cc:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ Main.cc:7:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations] gets(b); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from Main.cc:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ Main.cc:7:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations] gets(b); ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from Main.cc:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ Main.cc:8:10: error: 'strlwr' was not declared in this scope strlwr(a); ^ Main.cc:6:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result] gets(a); ^ Main.cc:7:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result] gets(b); ^