Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119776 罗子童 22破解密码 C++ Compile Error 0 MS 0 KB 398 2025-05-18 19:18:15

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 n[51]; cin>>n; int a=strlen(a); for(int i=0;i<a;i+=3){ cout<<n[i]; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:19: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
     int a=strlen(a);
                   ^
In file included from /usr/include/c++/5/cstring:42:0,
                 from Main.cc:3:
/usr/include/string.h:394:15: note:   initializing argument 1 of 'size_t strlen(const char*)'
 extern size_t strlen (const char *__s)
               ^