Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118289 潘明川 字符串长度判断 C++ Compile Error 0 MS 0 KB 412 2025-04-26 17:22:20

Tests(0/0):


Code:

#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[101],s2[101]; cin>>s1>>s2; int n=strlen(s); cout<<n<<endl; strcat(s,s2); cout<<s<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:18: error: 's' was not declared in this scope
     int n=strlen(s);
                  ^