Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82566 石晋骁 奇怪的国家 C++ Compile Error 0 MS 0 KB 246 2024-07-13 14:12:59

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string a,b; cin >> a; cin >> b; int abl = strlen(a); for(int i = 0;i < abl;i++){ if(a[i] == b[i]){ cout << "1"; }else { cout << "0"; } } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:20: error: cannot convert 'std::__cxx11::string {aka std::__cxx11::basic_string}' to 'const char*' for argument '1' to 'size_t strlen(const char*)'
  int abl = strlen(a);
                    ^
Main.cc: At global scope:
Main.cc:16:2: error: expected unqualified-id before 'return'
  return 0;
  ^
Main.cc:17:1: error: expected declaration before '}' token
 }
 ^