Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2691 | 张宸瑜 | 字符串相等判断 | C++ | Compile Error | 0 MS | 0 KB | 412 | 2024-01-20 17:43:44 |
# include<iostream> # include<cstdio> # include<iomanip> # include<iostream> # include<string> using namespace std; int main(){ //strca(s1,s2)把s2接在s1后面 //strcpy(s1,s2)将s2赋值给s2 //strcmp(s1,s2)将s1跟s2比较 char s1[1000],s2[1000]; cin>>s1>>s2; if(strcmp(s1,s2)==0){ cout<<"yes"; } else { cout<<"no"; } return 0; }
Main.cc: In function 'int main()': Main.cc:13:20: error: 'strcmp' was not declared in this scope if(strcmp(s1,s2)==0){ ^