Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6247 | 郑元泰 | 字符串拼接 | C++ | Compile Error | 0 MS | 0 KB | 360 | 2025-01-14 15:51:43 |
# include<iostream> using namespace std; int main(){ char s1[1000],s2[1000],s3[2000]; cin>>s1>>s2; int num_s1=strlen(s1); int num_s2=strlen(s2); for(int i=0;i<num_s1;i++) s3[i]=s1[i]; for(int i=num_s1;i<num_s1+num_s2;i++) s3[i]=s2[i-num_s1]; int n; cin>>n; cout<<s3[n-1]<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:6:25: error: 'strlen' was not declared in this scope int num_s1=strlen(s1); ^