submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s221899975 | p00006 | C++ | #include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
void reverse(char[]);
int main() {
char str[21];
cin >> str;
reverse(str);
}
void reverse(char s[]) {
int i, l=strlen(s);
char t;
for(i=0; i<l/2; i++) {
t=s[i];
s[i]=s[l-i-1];
s[l-i-1]=t;
}
cout << s;
} | a.cc: In function 'void reverse(char*)':
a.cc:17:18: error: 'strlen' was not declared in this scope
17 | int i, l=strlen(s);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <stdlib.h>
+++ |+#... |
s080192493 | p00006 | C++ | #include <iostream>
using namespace std;
int main() {
int l;
char t, str[21];
cin >> str;
l=strlen(str);
for(int i=0; i<l/2; i++) {
t=str[i];
str[i]=str[l-i-1];
str[l-i-1]=t;
}
cout << str;
} | a.cc: In function 'int main()':
a.cc:11:11: error: 'strlen' was not declared in this scope
11 | l=strlen(str);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
... |
s327466259 | p00006 | C++ | #include <iostream>
using namespace std;
int main() {
int l;
char t, str[64];
cin >> str;
l=strlen(str);
for(int i=0; i<l/2; i++) {
t=str[i];
str[i]=str[l-i-1];
str[l-i-1]=t;
}
cout << str;
} | a.cc: In function 'int main()':
a.cc:11:11: error: 'strlen' was not declared in this scope
11 | l=strlen(str);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
... |
s836634490 | p00006 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <algorithm>
typedef long long ll;
using namespace std;
int main()
{
string buf
cin >> buf;
reverse(buf.begin(),buf.end());
cout << buf << endl;
}
} | a.cc: In function 'int main()':
a.cc:13:1: error: expected initializer before 'cin'
13 | cin >> buf;
| ^~~
a.cc:14:9: error: 'buf' was not declared in this scope
14 | reverse(buf.begin(),buf.end());
| ^~~
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
17 | }
... |
s982586623 | p00006 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <algorithm>
typedef long long ll;
using namespace std;
int main()
{
string buf
cin >> buf;
reverse(buf.begin(),buf.end());
cout << buf << endl;
} | a.cc: In function 'int main()':
a.cc:13:1: error: expected initializer before 'cin'
13 | cin >> buf;
| ^~~
a.cc:14:9: error: 'buf' was not declared in this scope
14 | reverse(buf.begin(),buf.end());
| ^~~
|
s575571736 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string str;
cin >> str;
int i = 0,j = str.size() - 1;
while(i < j){
string tmp;
tmp = str[i];
str[i] = str[j];
str[j] = tmp;
}
cout << str << endl;
} | a.cc: In function 'int main()':
a.cc:14:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
14 | str[j] = tmp;
| ^~~
| |
| ... |
s221848327 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string str;
cin >> str;
int i = 0,j = str.size() - 1;
while(i < j){
string tmp;
tmp = str[i];
str[i] = str[j];
str[j] = tmp;
}
cout << str << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
14 | str[j] = tmp;
| ^~~
| |
| ... |
s940753374 | p00006 | C++ | #include <cstdio>
#include <string>
using namespace std;
int main() {
char str[20];
scanf("%s", str);
int len = strlen(str);
for (int i = len-1; i >= 0; i--) {
printf("%c", str[i]);
}
printf("\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:13: error: 'strlen' was not declared in this scope
7 | int len = strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <string>
+++ |+#include <cstring>
... |
s837135997 | p00006 | C++ | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
using namespace std;
int gcd( int, int );
int main()
{
char str[21];
scanf("%s... | a.cc: In function 'int main()':
a.cc:25:36: error: 'strlen' was not declared in this scope
25 | vector<char> v( str, str + strlen( str ) );
| ^~~~~~
a.cc:14:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s169540696 | p00006 | C++ | #include <cstdio>
#include <cstring>
int main( void )
{
int len;
char s[128];
gets( s );
len = strlen( s );
for( int i=len-1; i>=0; i-- ) putchar( s[i] );
putchar( '\n' );
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets( s );
| ^~~~
| getw
|
s613680847 | p00006 | C++ | #include <iostream>
using namespace std;
int main(){
char str[21];
char temp[21];
int i = 0;
memset(str, 0, sizeof(str));
memset(temp, 0, sizeof(temp));
while(cin >> str){
int n = strlen(str);
for(; n!=0; ){
temp[i++] = str[--n];
}
cout << temp << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'memset' was not declared in this scope
9 | memset(str, 0, sizeof(str));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cs... |
s536751411 | p00006 | C++ | #include <stdio.h>
#include <string.h>
int main() {char Tex[25];gets(Tex);for (int j=strlen(Tex)-1;j>=0;printf("%c",Tex[j--]));puts("");return 0;} | a.cc: In function 'int main()':
a.cc:3:26: error: 'gets' was not declared in this scope; did you mean 'getw'?
3 | int main() {char Tex[25];gets(Tex);for (int j=strlen(Tex)-1;j>=0;printf("%c",Tex[j--]));puts("");return 0;}
| ^~~~
| getw
|
s748365152 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main(){
int i,j,a,b;
char str[21];
scanf("%s",str);
a=strlen(str);
for(i=a;i>=0;i--){
printf("%c",str[i]);
}
printf("\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:5:12: error: unable to find numeric literal operator 'operator""\U0000ff11'
5 | char str[21];
| ^~~
a.cc:6:14: error: 'str' was not declared in this scope; did you mean 'std'?
6 | scanf("%s",str);
| ^~~
| std
|
s042521090 | p00006 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
int i=0, len=0;
char str[21];
gets(str);
len = strlen(str);
for(i=len; i>=0; i--)
{
printf("%c",str[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(str);
| ^~~~
| getw
|
s494740306 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
void srot(char *str){
int len, len3 = 0;
char str2[20], work;
len = strlen(str);
for(int len2 = 0; len > len2; len2++){
str2[len2] = str[len2];
}
for(len3 = 0, len = len - 1; len >= len3; len--,len3++){
work = str[len];
str[len] = str[len3];
s... | a.cc: In function 'void srot(char*)':
a.cc:8:15: error: 'strlen' was not declared in this scope
8 | len = strlen(str);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include ... |
s874723365 | p00006 | C++ | #include <string>
#include <iostream>
using namespace std;
int main()
{
string str;
cin >> str;
reverse( str.begin() , str.end() );
cout << str << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'reverse' was not declared in this scope
11 | reverse( str.begin() , str.end() );
| ^~~~~~~
|
s578856515 | p00006 | C++ | print raw_input()[::-1] | a.cc:1:1: error: 'print' does not name a type; did you mean 'int'?
1 | print raw_input()[::-1]
| ^~~~~
| int
|
s616748595 | p00006 | C++ | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
get.line (cin, string);
reverse(str.begin(), str.end());
cout << str << endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: overloaded function with no contextual type information
8 | get.line (cin, string);
| ^~~~
a.cc:8:24: error: expected primary-expression before ')' token
8 | get.line (cin, string);
| ^
|
s579653168 | p00006 | C++ | #include<iostream>
using namespace std;
int main(void){
string str;
cin >> str;
int l = str.size();
for(i = l; i >= 0; i++){
cout << str[i];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i = l; i >= 0; i++){
| ^
|
s695224523 | p00006 | C++ | #include<cstdio>
#include<cstring>
using namespace std;
int main(void){
char str[25];
scanf("%s",str);
int l = strlen(str);
for(int i = l; i >= 0; i--){
putchar(str[i]);
}
putchar('\n");
return 0;
} | a.cc:12:11: warning: missing terminating ' character
12 | putchar('\n");
| ^
a.cc:12:11: error: missing terminating ' character
12 | putchar('\n");
| ^~~~~~
a.cc: In function 'int main()':
a.cc:13:3: error: expected primary-expression before 'return'
13 | return 0;
|... |
s130924475 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string a;
int c;
string d[20];
c=0;
cin >> a;
while(string b(a,c,0)){
d[c]=b;
c=c+1;}
int e;
e=c-1;
while(e>=0){
cout << d[e];
e=e-1;}
} | a.cc: In function 'int main()':
a.cc:11:15: error: expected initializer before '(' token
11 | while(string b(a,c,0)){
| ^
a.cc:11:15: error: could not convert 'b' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
11 | while(string b(a,c,0)){
| ^
| ... |
s872621087 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string a;
cin >> a;
int b;
b=a size();
int c;
c=b-1;
while(c>=0){
string d(a,c,1);
cout << d;
c=c-1;}
} | a.cc: In function 'int main()':
a.cc:9:3: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
9 | b=a size();
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
|
s178408403 | p00006 | C++ | #include <iostream>
#include<string>
using namespace std;
int main(){
string s;
cin>>s;
for(int i=s.size()-1;i--){
cout<<s[i];
}cout<<endl;
} | a.cc: In function 'int main()':
a.cc:9:33: error: expected ';' before ')' token
9 | for(int i=s.size()-1;i--){
| ^
| ;
|
s375084522 | p00006 | C++ | #include <iostream>
using namespace std;
int main(void)
{
char str[20];
cin >> str;
for(int i=strlen(str) - 1;i>=0;i--)
{
putchar(str[i]);
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:13: error: 'strlen' was not declared in this scope
10 | for(int i=strlen(str) - 1;i>=0;i--)
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#incl... |
s318385310 | p00006 | C++ | #include <iostream>
#include <string>
#include <algorithm.h>
using namespace std;
int main()
{
string a;
cin>>a;
reverse(a.begin(),a.end());
cout<<a<<endl;
return 0;
} | a.cc:3:10: fatal error: algorithm.h: No such file or directory
3 | #include <algorithm.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s699594195 | p00006 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
void main()
{
char k[25];
scanf("%s",k);
reverse(k,k+strlen(k));
printf("%s",k);
} | a.cc:7:1: error: '::main' must return 'int'
7 | void main()
| ^~~~
|
s833226247 | p00006 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
void main()
{
char k[100];
scanf("%s",k);
reverse(k,k+strlen(k));
printf("%s",k);
} | a.cc:7:1: error: '::main' must return 'int'
7 | void main()
| ^~~~
|
s314048838 | p00006 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main( void )
{
string in;
while( cin >> in )
{
reverse(in.begin(), in.end())
cout << in << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:35: error: expected ';' before 'cout'
12 | reverse(in.begin(), in.end())
| ^
| ;
13 | cout << in << endl;
| ~~~~
|
s980138720 | p00006 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main( void )
{
string in;
while( cin >> in )
{
reverse(in.begin(), in.end())'
cout << in << endl;
}
return 0;
} | a.cc:12:35: warning: missing terminating ' character
12 | reverse(in.begin(), in.end())'
| ^
a.cc:12:35: error: missing terminating ' character
a.cc: In function 'int main()':
a.cc:12:35: error: expected ';' before 'cout'
12 | reverse(in.begin(), in.end())'
... |
s142447844 | p00006 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
stirng s;
while(cin >> s) {
reverse(s.begin(), s.end());
cout << s << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'stirng' was not declared in this scope
7 | stirng s;
| ^~~~~~
a.cc:8:16: error: 's' was not declared in this scope
8 | while(cin >> s) {
| ^
|
s567515105 | p00006 | C++ | #include <iostream>
#include <string.h>
using namespace std;
int main()
{
char *rev;
cin>>rev;
strrev(rev);
cout<<rev<<"\n";
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
9 | strrev(rev);
| ^~~~~~
| strsep
|
s161701313 | p00006 | C++ | #include <iostream>
#include <string.h>
using namespace std;
int main()
{
while(1)
{
char str[20];
cin>>str;
strrev(str);
cout<<str<<"\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
11 | strrev(str);
| ^~~~~~
| strsep
|
s639707930 | p00006 | C++ | nclude<iostream>
#include<vector>
#include<set>
#include<climits>
#include<cfloat>
#include<cmath>
#include<algorithm>
#include<string>
using namespace std;
int main(void){
string s;
cin >> s;
reverse(s.begin(),s.end());
cout << s << endl;
return 0;
} | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude<iostream>
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx... |
s142338961 | p00006 | C++ | (function() {
'use strict';
var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
var push = ArrayProto.push,
slice = ArrayProto.slice,
concat = ArrayProto.concat,
toString = ObjProto.toString,
hasOwnProperty = ObjProto.hasOwnProperty;
var
nativeForEach = ArrayProto.f... | a.cc:2:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
2 | 'use strict';
| ^~~~~~~~~~~~
a.cc:56:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
56 | 'use strict';
| ^~~~~~~~~~~~
a.cc:58:26: warni... |
s013449857 | p00006 | C++ | #include<iostream>
#include<cstring>
using namespace std;
int main()
{ int i,j;
char s[20];
cin>>s;
for(i=0,j=strlen(s)-1;i<j;i++,j--)
{char temp;
atemp=s[i];
s[i]=s[j];
s[j]=temp;
}
cout<<s;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'atemp' was not declared in this scope; did you mean 'temp'?
10 | atemp=s[i];
| ^~~~~
| temp
|
s141205159 | p00006 | C++ | #include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
string src;
cin >> src;
reverse(src.begin(), src.end());
cout << src << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'reverse' was not declared in this scope
10 | reverse(src.begin(), src.end());
| ^~~~~~~
|
s325513893 | p00006 | C++ | #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
using namespace std;
int main(){
char str[20];
int j = 0;
memset(str,'\0',sizeof(str));
while(cin >> str){
for(int i = sizeof(str) / sizeof(char) - 1; i >= 0; i--){
if(str[i] != '\0'){
cout << st... | a.cc: In function 'int main()':
a.cc:14:9: error: 'memset' was not declared in this scope
14 | memset(str,'\0',sizeof(str));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <stack>
+++ |+#include <cst... |
s564139301 | p00006 | C++ | #include <stdio.h>
#include <string.h>
int main (void) {
char s[21];
int i;
int l;
printf("Input text: ");
gets(s);
l=strlen(s);
for (i=l-1;i>=0;i--){
printf("%c",s[i]);
}
printf("\n");
system("pause");
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
a.cc:16:5: error: 'system' was not declared in this scope
16 | system("pause");
| ^~~~~~
|
s642606146 | p00006 | C++ | #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <string>
using namespace std;
int main()
{
string s;
cin>>s;
cout<<strrev((char*)s.c_str())<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:15: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
10 | cout<<strrev((char*)s.c_str())<<endl;
| ^~~~~~
| strsep
|
s426385714 | p00006 | C++ | #include <iostream>
#include <string.h>
using namespace std;
int main()
{
char str[21];
cin>>str;
while(cin>>str)
{
int len=strlen(str);
for(int i=str;i>=0;i--)
cout<<str[i];
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:14: error: invalid conversion from 'char*' to 'int' [-fpermissive]
11 | for(int i=str;i>=0;i--)
| ^~~
| |
| char*
|
s791460693 | p00006 | C++ | int main()
{
char *a;
char str[256];
// cout << "data_size=" << data_size << endl;
while (cin.getline(str,256)){
int data_size = sizeof(a) / sizeof(a[0]);
for(int i=0;i<=data_size;i++)
cout << str[data_size - i];
cout << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'cin' was not declared in this scope
6 | while (cin.getline(str,256)){
| ^~~
a.cc:9:25: error: 'cout' was not declared in this scope
9 | cout << str[data_size - i];
| ^~~~
a.cc:10... |
s862475093 | p00006 | C++ | #include <iostream>
#include <iomanip>
using namespace std;
int main(){
int size;
char str[21];
cin >> setw(21) >> str;
size = strlen(str);
for(int i=size-1;0<=i;i--){
cout << str[i];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: 'strlen' was not declared in this scope
10 | size = strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iomanip>
+++ |+#include <cstring>
... |
s931003675 | p00006 | C++ | #include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main(){
int size;
char str[21];
cin >> setw(21) >> str;
size = strlen(str);
for(int i=size-1;0<=i;i--){
cout << str[i];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:12: error: 'strlen' was not declared in this scope
11 | size = strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iomanip>
+++ |+#include <cstring>
... |
s851229506 | p00006 | C++ | #include <string>
#include <cstdio>
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
int size;
char str[21];
cin >> setw(21) >> str;
size = strlen(str);
for(int i=size-1;0<=i;i--){
cout << str[i];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:12: error: 'strlen' was not declared in this scope
12 | size = strlen(str);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <iomanip>
+++ |+#include <cstring>
... |
s200097680 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int void()
{
char str[20];
gets(str);
strrev(str);
puts(str);
} | a.cc:3:10: error: expected unqualified-id before ')' token
3 | int void()
| ^
|
s727409808 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
string str; cin >> str;
reverse(str.begin(), str.end());
cout << str << endl;
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'reverse' was not declared in this scope
8 | reverse(str.begin(), str.end());
| ^~~~~~~
|
s272846266 | p00006 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
int kazu;
char rin[21];
scanf("%s",rin);
kazu = strlen(rin);
for(int i = kazu-1; i >= 0; i--) {
cout << rin[i];
}
cout << "\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:13:16: error: 'strlen' was not declared in this scope
13 | kazu = strlen(rin);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
+++ |+#include <cs... |
s299672630 | p00006 | C++ | #include<iostream>
#include<string>
int main(){
std::string str;
std::cin>>str;
for(int i=str.size-1;i>=0;i--){
std::cout<<str[i];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsign... |
s108845320 | p00006 | C++ | #include <stdio.h>
#include <string>
int main()
{
char p[20];
int i;
gets(p);
for(i=(strlen(p)-1);i>=0;i--)
printf("%c",p[i]);
printf("\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(p);
| ^~~~
| getw
a.cc:8:8: error: 'strlen' was not declared in this scope
8 | for(i=(strlen(p)-1);i>=0;i--)
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cst... |
s678443548 | p00006 | C++ | #include<iostream>
#include<iomanip>
using namespace std;
int main(){
char str[21];
int i, l;
cin >> setw(21) >>str;
l = strlen(str);
for( i=1; i<=l; i++ ){
cout << str[ l - i ];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:13: error: 'strlen' was not declared in this scope
12 | l = strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<iomanip>
+++ |+#include <cstring>
... |
s821019704 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char ch[20];
int i;
while(gets(ch)!=EOF)
{
for(i=0;ch[i]!='\0';i++)
{
}
for(i=i-1;i>=0;i--)
{
printf("%c",ch[i]);
}
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | while(gets(ch)!=EOF)
| ^~~~
| getw
|
s087421862 | p00006 | C++ | #include<iostream>
#include<string>
int main(){
std::string a;
srd::cin>>a;
for(int i=a.size();i>=0;i--){
std::cout<<a[i];
}
std::cout<<std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:2: error: 'srd' has not been declared
5 | srd::cin>>a;
| ^~~
|
s393149462 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
cin >> s;
reverse(s.begin(), s.end());
cout << s << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'reverse' was not declared in this scope
9 | reverse(s.begin(), s.end());
| ^~~~~~~
|
s687671583 | p00006 | C++ | #include<iostream>
using namespace std;
int main(){
string str;
cin>>str;
reverse(str.begin(),str.end());
cout<<str<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:4: error: 'reverse' was not declared in this scope
11 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s902210447 | p00006 | C++ | #include<iostream>
using namespace std;
int main(){
string str;
cin>>str;
reverse(str.begin(),str.end());
cout<<str<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:4: error: 'reverse' was not declared in this scope
11 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s978352864 | p00006 | C++ | #include<iostream>
using namespace std;
int main(){
string str;
cin>>str;
reverse(str.begin(),str.end());
cout<<str<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:4: error: 'reverse' was not declared in this scope
11 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s312852085 | p00006 | C++ | include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string str;
cin>>str;
reverse(str.begin(),str.end());
cout<<str<<endl;
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type... |
s708307866 | p00006 | C++ | #include<stdio.h>
#include <string.h>
int main()
{
char a[30];
scanf("%s",&a);
strrev(a);
printf("%s\n",a);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
7 | strrev(a);
| ^~~~~~
| strsep
|
s150099094 | p00006 | C++ | #include<cstdio>
#include<iostream>
#include<string>
using namespace std;
int main(){
char str[30]={};
int i=0;
cin >> str;
for(i = str.length() - 1;i>=0;i--) cout<<str[i];
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:21: error: request for member 'length' in 'str', which is of non-class type 'char [30]'
12 | for(i = str.length() - 1;i>=0;i--) cout<<str[i];
| ^~~~~~
|
s050884734 | p00006 | C++ | #include<iostream>
#include<stdio.h>
#include <string>
using namespace std;
int main(){
string a;
cin>>a;
reverse(a.begin(), a.end());
cout<<a<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'reverse' was not declared in this scope
10 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s919432849 | p00006 | C++ | #include<iostream>
#include<stdio.h>
#include <string>
using namespace std;
int main(){
string a;
cin>>a;
reverse(a.begin(), a.end());
cout<<a<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'reverse' was not declared in this scope
10 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s297019853 | p00006 | C++ | #include<iostream>
#include<stdio.h>
#include<string>
#include<math.h>
#include<iomanip>
using namespace std;
int main(void){
string str;
cin>>str;
for(int i=length(str);i--;){
cout<<str[i];
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:11:19: error: 'length' was not declared in this scope
11 | for(int i=length(str);i--;){
| ^~~~~~
|
s746359641 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
string text;
cin>>text;
reverse(text.begin(), text.end());
cout<<text<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'reverse' was not declared in this scope
9 | reverse(text.begin(), text.end());
| ^~~~~~~
|
s321252118 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
cin>>string s;
for(int i=s.length();i>0;i--) cout<<s.at(i-1);
cout<<'\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:6:21: error: expected primary-expression before 's'
6 | cin>>string s;
| ^
a.cc:7:19: error: 's' was not declared in this scope
7 | for(int i=s.length();i>0;i--) cout<<s.at(i-1);
| ^
|
s324934819 | p00006 | C++ | #include<iostream>
#include<cstdio>
#include<string>
//入力された文字列を逆順に出力
using namespace std;
int main(){
char a[20];
scanf("%s",a);
for(int i =strlen(a)-1;i >=0;i--){
putchar(a[i]);
}
} | a.cc: In function 'int main()':
a.cc:10:14: error: 'strlen' was not declared in this scope
10 | for(int i =strlen(a)-1;i >=0;i--){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include... |
s489233982 | p00006 | C++ | #include<iostream>
#include<cstdio>
#include<string>
//入力された文字列を逆順に出力
using namespace std;
int main(){
char a[20];
scanf("%s",a);
for(int i =strlen(a)-1;i >=0;i--){
putchar(a[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:14: error: 'strlen' was not declared in this scope
10 | for(int i =strlen(a)-1;i >=0;i--){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include... |
s091778034 | p00006 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<stdio.h>
//入力された文字列を逆順に出力
using namespace std;
int main(){
char a[20];
scanf("%s",a);
for(int i =strlen(a)-1;i >=0;i--){
putchar(a[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:14: error: 'strlen' was not declared in this scope
11 | for(int i =strlen(a)-1;i >=0;i--){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include... |
s569432420 | p00006 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<stdio.h>
//入力された文字列を逆順に出力
using namespace std;
int main(){
char a[20];
scanf("%s",a);
for(int i =strlen(a)-1;i >=0;i--){
putchar(a[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:14: error: 'strlen' was not declared in this scope
11 | for(int i =strlen(a)-1;i >=0;i--){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include... |
s802989575 | p00006 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<stdio.h>
//入力された文字列を逆順に出力
using namespace std;
int main(){
char a[20];
scanf("%s",a);
for(int i =strlen(a)-1;i >=0;i--){
putchar(a[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:14: error: 'strlen' was not declared in this scope
11 | for(int i =strlen(a)-1;i >=0;i--){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include... |
s871287533 | p00006 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<stdio.h>
//入力された文字列を逆順に出力
using namespace std;
int main(){
char a[20];
scanf("%s",a);
for(int i =strlen(a)-1;i >=0;i--){
putchar(a[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:14: error: 'strlen' was not declared in this scope
11 | for(int i =strlen(a)-1;i >=0;i--){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include... |
s543317978 | p00006 | C++ | #include<iostream>
using namespace std;
int main()
{
char a[20];
cin >> a;
for (int i = strlen(a)-1;i>=0;i--){
cout << a[i];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:22: error: 'strlen' was not declared in this scope
9 | for (int i = strlen(a)-1;i>=0;i--){
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
... |
s792047874 | p00006 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
char arr[21];
gets(arr);
strrev(arr);
printf("%s",arr);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(arr);
| ^~~~
| getw
a.cc:8:4: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
8 | strrev(arr);
| ^~~~~~
| strsep
|
s997721536 | p00006 | C++ | #include <iostream>
using namespace std;
int main(){
char a[40];
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len;i>=0;i--){
cout<<a[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:7: error: 'strlen' was not declared in this scope
7 | len = strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | using n... |
s370176092 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
char a[40];
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len;i>=0;i--){
cout<<a[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'strlen' was not declared in this scope
8 | len = strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #includ... |
s743551421 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
char a[40];
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len;i>=0;i--){
cout<<a[i];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'strlen' was not declared in this scope
8 | len = strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #includ... |
s758387167 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
char a[40];
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len;i>=0;i--){
cout<<a[i];
}
cout<<\n<<endl;
return 0;
} | a.cc:12:7: error: stray '\' in program
12 | cout<<\n<<endl;
| ^
a.cc: In function 'int main()':
a.cc:8:7: error: 'strlen' was not declared in this scope
8 | len = strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <c... |
s565721055 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
char a[40];
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len;i>=0;i--){
cout<<a[i];
}
cout<<' '<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'strlen' was not declared in this scope
8 | len = strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #includ... |
s592989530 | p00006 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
char a[40];
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len;i>=0;i--){
cout<<a[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:7: error: 'strlen' was not declared in this scope
9 | len = strlen(a);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cstring>
4 | using ... |
s427389885 | p00006 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
char a[40]={0};
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len-1;i>=0;i--){
cout<<a[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:7: error: 'strlen' was not declared in this scope
9 | len = strlen(a);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cstring>
4 | using ... |
s424025272 | p00006 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
char a[40]={0};
int len,b;
cin>>a;
len = strlen(a);
for(int i=len-1;i>=0;i--){
cout<<a[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:7: error: 'strlen' was not declared in this scope
9 | len = strlen(a);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cstring>
4 | using ... |
s618215276 | p00006 | C++ | #include <iostream>
#include <iostring>
#include <algorithm>
using namespace std;
int main(){
char a[40]={0};
int len,b;
cin.getline(a,40);
len = strlen(a);
for(int i=len-1;i>=0;i--){
cout<<a[i];
}
cout<<endl;
return 0;
} | a.cc:2:10: fatal error: iostring: No such file or directory
2 | #include <iostring>
| ^~~~~~~~~~
compilation terminated.
|
s414066165 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char a[21];
gets(a);
strrev(a);
puts(a);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:6: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(a);
| ^~~~
| getw
a.cc:8:6: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
8 | strrev(a);
| ^~~~~~
| strsep
|
s874882661 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
int i;
while(cin>>s)
{
strreverse(s)
cout<<s<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:3: error: 'strreverse' was not declared in this scope
15 | strreverse(s)
| ^~~~~~~~~~
|
s454828019 | p00006 | C++ | #include <iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main()
{
char ar[25];
gets(ar);
reverse(ar,ar + strlen(ar));
puts(ar);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(ar);
| ^~~~
| getw
|
s726732225 | p00006 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
cin>>str;
reverse(str.begin(),str.end());
cout<<str<<endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'reverse' was not declared in this scope
7 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s357215177 | p00006 | C++ | #include<iostream>
using namespace std;
int main()
{
char s[21];
cin.getline(s, 21, '\n');
int l = strlen(s);
for (int i = l - 1; i >= 0; i--)
cout << s[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:8:17: error: 'strlen' was not declared in this scope
8 | int l = strlen(s);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstr... |
s926746293 | p00006 | C++ | #include<iostream>
using namespace std;
int main()
{
char s[21];
cin.getline(s, 21, '\n');
int l = strlen(s);
for (int i = l - 1; i >= 0; i--)
cout << s[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:8:17: error: 'strlen' was not declared in this scope
8 | int l = strlen(s);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstr... |
s806924812 | p00006 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
char s[21];
cin.getline(s, 21, '\n');
int l = strlen(s);
for (int i = l - 1; i >= 0; i--)
cout << s[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'strlen' was not declared in this scope
9 | int l = strlen(s);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstr... |
s238436567 | p00006 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
char s[21];
cin.getline(s, 21, '\n');
int l = strlen(s);
for (int i = l - 1; i >= 0; i--)
cout << s[i];
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'strlen' was not declared in this scope
9 | int l = strlen(s);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstr... |
s473666757 | p00006 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
cin>>s;
for(int i=s.size();--i);
cout<<s[i];
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:31: error: expected ';' before ')' token
7 | for(int i=s.size();--i);
| ^
| ;
a.cc:8:25: error: 'i' was not declared in this scope
8 | cout<<s[i];
| ... |
s729645176 | p00006 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
cin>>s;
for(int i=s.size();--i)
cout<<s[i];
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:31: error: expected ';' before ')' token
7 | for(int i=s.size();--i)
| ^
| ;
|
s324547042 | p00006 | C++ | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#define ll long long
using namespace std;
int main()
{
//int k,i,j,tep,x,a[170],m;
char a[22];
gets(a);
cout<<strrev(a)<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(a);
| ^~~~
| getw
a.cc:14:12: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
14 | cout<<strrev(a)<<endl;
| ^~~~~~
| ... |
s894110266 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char arr[20];
gets(arr);
strrev(arr);
printf("%s\n",arr);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(arr);
| ^~~~
| getw
a.cc:7:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
7 | strrev(arr);
| ^~~~~~
| strsep
|
s790137220 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main(){
char str[50];
char *rev;
scanf("%s",str);
rev = strrev(str);
printf("%s ",rev);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:11: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
7 | rev = strrev(str);
| ^~~~~~
| strsep
|
s759729051 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main(){
char str [20];
gets(str );
strrev(str );
printf("%s",str );
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(str );
| ^~~~
| getw
a.cc:6:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
6 | strrev(str );
| ^~~~~~
| strsep
|
s854519099 | p00006 | C++ | #include<bits/stdc++.h>
int main()
{
int m,n,i,j,k,l;
char a[400];
while(scanf("%s",&a)==1)
{
strrev(a);
printf("%s",a);
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:8: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
8 | strrev(a);
| ^~~~~~
| strsep
|
s264045970 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char str,rev,arr[100];
printf("Enter a string to reverse\n");
gets(arr);
strrev(arr);
printf("%s",arr);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(arr);
| ^~~~
| getw
a.cc:9:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
9 | strrev(arr);
| ^~~~~~
| strsep
|
s623556021 | p00006 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char str,rev,arr[100];
gets(arr);
strrev(arr);
printf("%s",arr);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(arr);
| ^~~~
| getw
a.cc:8:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
8 | strrev(arr);
| ^~~~~~
| strsep
|
s529577976 | p00006 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string s;
cin>>s;
reverse(s.begin(),s.end());
cout<<s<<endl;
| a.cc: In function 'int main()':
a.cc:9:23: error: expected '}' at end of input
9 | cout<<s<<endl;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s469478379 | p00006 | C++ | #include <string.h>
int main( void ){
char str[20];
scanf( "%s",str );
for( int i = strlen( str )-1;i > 0;i-- )printf( "%c",str[i-1] );
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
5 | scanf( "%s",str );
| ^~~~~
a.cc:6:45: error: 'printf' was not declared in this scope
6 | for( int i = strlen( str )-1;i > 0;i-- )printf( "%c",str[i-1] );
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.