| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 98344 | Kevin | 字符串相等判断 | C++ | Compile Error | 0 MS | 0 KB | 196 | 2024-11-19 15:59:24 |
#include<bits/stdc++.h> using namespace std; int main(){ char s1[1000],s2[1000]; gets(s1); gets(s2); if(strcmpy(s1,s2)==0){ cout<<"yes"; } else cout<<"no"; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:2: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(s1);
^
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(s1);
^
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:9: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(s1);
^
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(s2);
^
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(s2);
^
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:9: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(s2);
^
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:18: error: 'strcmpy' was not declared in this scope
if(strcmpy(s1,s2)==0){
^
Main.cc:5:10: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
gets(s1);
^
Main.cc:6:10: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
gets(s2);
^