| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132860 | 郑景文 | 字符串相等判断 | C++ | Compile Error | 0 MS | 0 KB | 202 | 2025-10-12 14:24:38 |
#include<bits/stdc++.h> using namespace std; int main(){ char a[1000]; char b[1000]; cin>>a>>b; if(strcmp(a)==0){ cout<<"yes"; } else{ cout<<"no"; } return 0; }
Main.cc: In function 'int main()':
Main.cc:7:16: error: too few arguments to function 'int strcmp(const char*, const char*)'
if(strcmp(a)==0){
^
In file included from /usr/include/c++/5/cstring:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:48,
from Main.cc:1:
/usr/include/string.h:140:12: note: declared here
extern int strcmp (const char *__s1, const char *__s2)
^