Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62357 vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 字符串拼接 C++ Compile Error 0 MS 0 KB 283 2023-12-23 15:56:18

Tests(0/0):


Code:

#include<iostream> #include<cstring> using namespace std; int main(){ char a[1000],b[1000]; int al,bl; int j; cin>>a; cin>>b; cin>>j; al=strlen(a); bl=strlen(b); for(int i=1;i<=b;i++){ a[al-1+i] } cout<<b[j]; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  for(int i=1;i<=b;i++){
                 ^
Main.cc:16:2: error: expected ';' before '}' token
  } 
  ^
Main.cc:15:11: warning: statement has no effect [-Wunused-value]
   a[al-1+i]
           ^