Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
105447 | 罗迎甲 | 字符串相等判断 | C++ | Compile Error | 0 MS | 0 KB | 483 | 2025-01-13 16:33:50 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char s1[1001]; char s2[1001]; cin >> a >> b; int n = strcmp(a,b); if(n==0) { cout<<"yes"; } else { cout << "no"; } return 0; } return 0; }
Main.cc: In function 'int main()': Main.cc:10:12: error: 'a' was not declared in this scope cin >> a >> b; ^ Main.cc:10:17: error: 'b' was not declared in this scope cin >> a >> b; ^ Main.cc:8:10: warning: unused variable 's1' [-Wunused-variable] char s1[1001]; ^ Main.cc:9:10: warning: unused variable 's2' [-Wunused-variable] char s2[1001]; ^ Main.cc: At global scope: Main.cc:24:5: error: expected unqualified-id before 'return' return 0; ^ Main.cc:25:1: error: expected declaration before '}' token } ^