Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118510 李昊宇 字符串相等判断 C++ Compile Error 0 MS 0 KB 253 2025-05-04 14:16:41

Tests(0/0):


Code:

#include<iostream> #include<cstring> using namespace std; int main(){ int n; char s1[1001]; char s2[1001]; cin>>s1>>s2; if(strcmp(a,b)==0){ cout<<"yes"; } else{ cout<<"no"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:15: error: 'a' was not declared in this scope
     if(strcmp(a,b)==0){
               ^
Main.cc:9:17: error: 'b' was not declared in this scope
     if(strcmp(a,b)==0){
                 ^
Main.cc:5:9: warning: unused variable 'n' [-Wunused-variable]
     int n;
         ^