Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
99289 hby 31忽略大小写的字符串比较 C++ Compile Error 0 MS 0 KB 327 2024-11-24 19:32:11

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; char a[100000],b[10000]; int main(){ gets(a); gets(b); int len1=strlen(a); int len2=strlen(b); strlwr(a);strlwr(b); if(strcmp(a,b)==0){ cout<<"="; } else{ if(strcmp(a,b)>0){ cout<<">"; }else if(strcmp(a,b)<0){ cout<<"<"; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5: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:5: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:5: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:6: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:6: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:6: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:9:11: error: 'strlwr' was not declared in this scope
   strlwr(a);strlwr(b);
           ^
Main.cc:7:7: warning: unused variable 'len1' [-Wunused-variable]
   int len1=strlen(a); 
       ^
Main.cc:8:7: warning: unused variable 'len2' [-Wunused-variable]
   int len2=strlen(b); 
       ^
Main.cc:5:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
  gets(a);
         ^
Main.cc:6:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
  gets(b);
         ^