criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <stdio.h>

int main (void)
{
	char str[21], new_str[21];
	gets(str);
	
	int i;
	for(i=0; i<21; i++){
		new_str[i]='\0';
	}
	
	for(i=0; i<20; i++){
		if(str[i]=='\0' || str[i]=='\n'){break;}
		new_str[20-i]=str[i];
	}
	
	for(i=0; i<21; i++){
		if(new_str[i]!='\0'){printf("%c", new_str[i]);}
	}
	
	printf("\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         gets(str);
      |         ^~~~
      |         getw
Language: C++

#include<iostream>
int main(){char c[21];std::cin>>c;std::string d(c);std::reverse(d.begin(),d.end());std::cout<<d.c_str()<<'\n';}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:57: error: 'reverse' is not a member of 'std'
    2 | int main(){char c[21];std::cin>>c;std::string d(c);std::reverse(d.begin(),d.end());std::cout<<d.c_str()<<'\n';}
      |                                                         ^~~~~~~
Language: C++

int main(){
  char buff[100];
  int n;
  scanf("%s",buff);
  for(n = strlen(buff); n;) putchar(buff[--n]);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf' was not declared in this scope
    4 |   scanf("%s",buff);
      |   ^~~~~
a.cc:5:11: error: 'strlen' was not declared in this scope
    5 |   for(n = strlen(buff); n;) putchar(buff[--n]);
      |           ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main(){
a.cc:5:29: error: 'putchar' was not declared in this scope; did you mean 'char'?
    5 |   for(n = strlen(buff); n;) putchar(buff[--n]);
      |                             ^~~~~~~
      |                             char
Language: C++

int main(){
  char buff[100];
  int n;
  scanf("%s",buff);
  for(n = strlen(buff); n;) putchar(buff[--n]);
  puts("");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf' was not declared in this scope
    4 |   scanf("%s",buff);
      |   ^~~~~
a.cc:5:11: error: 'strlen' was not declared in this scope
    5 |   for(n = strlen(buff); n;) putchar(buff[--n]);
      |           ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main(){
a.cc:5:29: error: 'putchar' was not declared in this scope; did you mean 'char'?
    5 |   for(n = strlen(buff); n;) putchar(buff[--n]);
      |                             ^~~~~~~
      |                             char
a.cc:6:3: error: 'puts' was not declared in this scope
    6 |   puts("");
      |   ^~~~
Language: C++

main(i){i*=i-10&&main(getchar())*putchar(i-1?i:10);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(i){i*=i-10&&main(getchar())*putchar(i-1?i:10);}
      |     ^
Language: C++

char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));}

Compiler output:
a.cc:1:15: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));}
      |               ^~~~
a.cc: In function 'int main()':
a.cc:1:22: error: 'gets' was not declared in this scope
    1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));}
      |                      ^~~~
a.cc:1:36: error: 'index' was not declared in this scope
    1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));}
      |                                    ^~~~~
a.cc:1:51: error: 'putchar' was not declared in this scope; did you mean 'char'?
    1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));}
      |                                                   ^~~~~~~
      |                                                   char
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main()
{
	string str;
	
	cin >> str;
	
	for(int i = str.length(); i > -1; i--){
		cout << str[i-1s] << flush;
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:31: error: unable to find numeric literal operator 'operator""s'
   13 |                 cout << str[i-1s] << flush;
      |                               ^~
Language: C++

#include <cstdio>
int main( int argc, char *argv[] ) {
	using namespace std;
	char str[20];
	fscanf(stdin, "%s", str);
	for (int i=0; i<20; i++) {
		if (str[i] == '\0') {
			int last = i-1;
			for (int j=0; j<i/2; j++) {
				swap(str[j], str[last-j]);
			}
			break;
		}
	}
	printf("%s\n", str);
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:33: error: 'swap' was not declared in this scope
   10 |                                 swap(str[j], str[last-j]);
      |                                 ^~~~
Language: C++


#include <iostream>
#include <sstream>
#include <string>

using namespace std;

int main(void)
{
    string str;
    getline(cin, str);

    reverse(str.begin(), str.end());
    cout << str << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'reverse' was not declared in this scope
   13 |     reverse(str.begin(), str.end());
      |     ^~~~~~~
Language: C++

#include <stdio.h>
#include<string.h>
int main(void){
  
  int i,j,n;
  i=0;
  j=0;
  char a[20],b[20];
  
  gets(a);
  n = strlen(a);

  for(i=n-1;i>=0;i--)
    {
      b[n-1-i]=a[i];
    }
  b[n]='\0';

  printf("%s\n",b);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |   gets(a);
      |   ^~~~
      |   getw
Language: C++

#include <cstdio>
#include <stack>

using namespace std;

int main()
{
	char str[22];

	fgets( str, sizeof( str ) - 1, stdin );

	for ( int i = strlen( str ) - 1; 0 <= i; i-- )
	{
		putchar( str[i] );
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'strlen' was not declared in this scope
   12 |         for ( int i = strlen( str ) - 1; 0 <= i; i-- )
      |                       ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stack>
  +++ |+#include <cstring>
    3 |
Language: C++

import java.util.Scanner;

public class Main{
    Main(){
	Scanner sc= new Scanner(System.in);

	while(sc.hasNext()){
	    String str = sc.next();
	    char[] ch = str.toCharArray();

	    for(int i = str.length()-1; i >= 0; i--)
		System.out.print(Character.toString(ch[i]));
	    System.out.println();
	}
    }

    public static void main(String[] args){
	new Main();
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

#include <stdio.h>
#include <string.h>

int main(void)
{
char str[256];
char rev[256];

for (int i = 0; str[i] != '\0'; i++){
rev[i] = str[strlen(str) - 1 - i;
}
rev[strlen(str)] = '\0';

printf("%s", rev);

return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: expected ']' before ';' token
   10 | rev[i] = str[strlen(str) - 1 - i;
      |                                 ^
      |                                 ]
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
	char str[30], *end_p;
	int end;;
	cin >>str;
	
	end_p = strrchr(str, '\0');
	end = end_p - str;
	
	for(int i = (end - 1); i >= 0; i--){
		cout <<str[i];
	}
	
	cout <<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'strrchr' was not declared in this scope
   10 |         end_p = strrchr(str, '\0');
      |                 ^~~~~~~
a.cc:2:1: note: 'strrchr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}
      |     ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

int main(){
  string str;
  while(cin >> str){
    reverse(str.begin(), str.end());
    cout << str << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string str;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   while(cin >> str){
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:16: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |   while(cin >> str){
      |                ^~~
      |                std
a.cc:8:5: error: 'reverse' was not declared in this scope; did you mean 'std::reverse'?
    8 |     reverse(str.begin(), str.end());
      |     ^~~~~~~
      |     std::reverse
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: 'std::reverse' declared here
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << str << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout << str << endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>
#include <string>

int main(void){
	char c[21];
	scanf("%s", c);
	for(int i=strlen(c)-1; i>=0; --i){
		printf("%c", *(c+i));
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'strlen' was not declared in this scope
    7 |         for(int i=strlen(c)-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 <string>
  +++ |+#include <cstring>
    3 |
Language: C++


using namespace std;

main(){
  
  char str[21];
  int i=0;
  while(cin >> str[i]){i++;}
  
  i--;
  int j=i;
  for(j=i;j>=0;j--){
    
    cout << str[j] ; 
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |   while(cin >> str[i]){i++;}
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << str[j] ;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:11: error: 'endl' was not declared in this scope
   16 |   cout << endl;
      |           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 |
Language: C++

#include <string.h>
#include <ctype.h>
main(i){char s[21];scanf("%s",s);if(s[16]=='9')return 1;return 0;}

Compiler output:
a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token
    3 | main(i){char s[21];scanf("%s",s);if(s[16]=='9')return 1;return 0;}
      |     ^
Language: C++

#include<stdio.h>
#include<stdlib.h>
int main(void){
  char a,b,i,j;
  char rarara[1000];
  char papapa[1000]; 
 gets(rarara);
 for(i=0;rarara[i]!=NULL;i++){};
 a=i;
  for(i=0;i<a;i++)
    papapa[i]=rarara[a-i-1];
  papapa[a]=NULL;
  printf("%s\n",papapa);
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |  gets(rarara);
      |  ^~~~
      |  getw
a.cc:8:21: warning: NULL used in arithmetic [-Wpointer-arith]
    8 |  for(i=0;rarara[i]!=NULL;i++){};
      |                     ^~~~
a.cc:12:13: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
   12 |   papapa[a]=NULL;
      |             ^~~~
a.cc:14:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |   return;
      |   ^~~~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
int main(void){
  char a,b,i,j;
  char rarara[1000];
  char papapa[1000]; 
  fgets(rarara,sizeof(rarara),stdin);
 for(i=0;rarara[i]!=NULL;i++){};
 a=i;
  for(i=0;i<a;i++)
    papapa[i]=rarara[a-i-1];
  papapa[a]=NULL;
  printf("%s\n",papapa);
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: warning: NULL used in arithmetic [-Wpointer-arith]
    8 |  for(i=0;rarara[i]!=NULL;i++){};
      |                     ^~~~
a.cc:12:13: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
   12 |   papapa[a]=NULL;
      |             ^~~~
a.cc:14:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |   return;
      |   ^~~~~~
Language: 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;

}

Compiler output:
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>
  +++ |+#include <cstring>
    4 |
Language: 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;

}

Compiler output:
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>
    2 |
Language: 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;

}

Compiler output:
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>
    2 |
Language: 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;
}
}

Compiler output:
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 | }
      | ^
Language: 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;
}

Compiler output:
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());
      |         ^~~
Language: 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;
}

Compiler output:
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;
      |                  ^~~
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
Language: 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;
}

Compiler output:
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;
      |                  ^~~
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
Language: 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;
}

  

Compiler output:
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>
    3 | using namespace std;
Language: 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", str );
	
	vector<char> v( str, str + strlen( str ) );
	reverse( v.begin(), v.end() );

	for ( unsigned int i = 0; i < v.size(); i++ )
	{
		printf("%c", v[i] );
	}

	return 0;
}

Compiler output:
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>'
   13 | #include <functional>
  +++ |+#include <cstring>
   14 |
Language: 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;
}

Compiler output:
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
Language: 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;
}

Compiler output:
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 <cstring>
    2 | using namespace std;
a.cc:13:25: error: 'strlen' was not declared in this scope
   13 |                 int n = strlen(str);
      |                         ^~~~~~
a.cc:13:25: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: 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;}

Compiler output:
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
Language: C++

#include<stdio.h>
#include<string.h>
int main(){
  int i,j,a,b;
  char str[2１];
  scanf("%s",str);
  a=strlen(str);
  for(i=a;i>=0;i--){
    printf("%c",str[i]);
  }
  printf("\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: unable to find numeric literal operator 'operator""\U0000ff11'
    5 |   char str[2１];
      |            ^~~
a.cc:6:14: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   scanf("%s",str);
      |              ^~~
      |              std
Language: 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;
}

Compiler output:
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
Language: 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];
		str[len3] = work;
	}
}

int main(){
	char str[20];
	while (cin >> str) {
		srot(str);
		cout << str << endl;
	}
}   

Compiler output:
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 <cstring>
    2 | #include <string>
Language: C++

#include <string>
#include <iostream>
using namespace std;


int main()
{
	string str;

	cin >> str;
	reverse( str.begin() , str.end() );
	cout << str << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'reverse' was not declared in this scope
   11 |         reverse( str.begin() , str.end() );
      |         ^~~~~~~
Language: 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;
}

Compiler output:
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);
      |                        ^
Language: 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;
}

Compiler output:
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++){
      |       ^
Language: 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;
}

Compiler output:
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;
      |   ^~~~~~
Language: 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;}


}

Compiler output:
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)){
      |               ^
      |               |
      |               std::string {aka std::__cxx11::basic_string<char>}
a.cc:11:15: error: expected ')' before '(' token
   11 | while(string b(a,c,0)){
      |      ~        ^
      |               )
a.cc:11:22: error: expected ';' before ')' token
   11 | while(string b(a,c,0)){
      |                      ^
      |                      ;
Language: 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;}

}

Compiler output:
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>}
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: expected ';' before ')' token
    9 |         for(int i=s.size()-1;i--){
      |                                 ^
      |                                 ;
Language: 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;
}

Compiler output:
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>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: 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;
}

Compiler output:
a.cc:3:10: fatal error: algorithm.h: No such file or directory
    3 | #include <algorithm.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: 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);
}

Compiler output:
a.cc:7:1: error: '::main' must return 'int'
    7 | void main()
      | ^~~~
Language: 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);
}

Compiler output:
a.cc:7:1: error: '::main' must return 'int'
    7 | void main()
      | ^~~~
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:35: error: expected ';' before 'cout'
   12 |      reverse(in.begin(), in.end())
      |                                   ^
      |                                   ;
   13 |      cout << in << endl;
      |      ~~~~
Language: 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;
}

Compiler output:
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())'
      |                                   ^
      |                                   ;
   13 |      cout << in << endl;
      |      ~~~~
Language: 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;
}

Compiler output:
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) {
      |                ^
Language: C++

#include <iostream>
#include <string.h>
using namespace std;

int main()
{
    char *rev;
    cin>>rev;
    strrev(rev);
    cout<<rev<<"\n";
}

Compiler output:
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
Language: 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;
}

Compiler output:
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
Language: 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;
}

Compiler output:
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
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'reverse' was not declared in this scope
   10 |         reverse(src.begin(), src.end());
      |         ^~~~~~~
Language: 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 << str[i];
			}
		}
		cout << endl;
	}

	return 0;
}

Compiler output:
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 <cstring>
    7 |
Language: 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");
}

Compiler output:
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");
      |     ^~~~~~
Language: 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;
}

Compiler output:
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
Language: 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;
}

Compiler output:
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*
Language: 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;
}

Compiler output:
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:17: error: 'cout' was not declared in this scope
   10 |                 cout << endl;
      |                 ^~~~
a.cc:10:25: error: 'endl' was not declared in this scope
   10 |                 cout << endl;
      |                         ^~~~
Language: 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;
}

Compiler output:
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>
    3 |
Language: 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;
}

Compiler output:
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>
    3 | #include <string>
Language: 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;
}

Compiler output:
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>
    5 |
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void){
  string str; cin >> str;
  reverse(str.begin(), str.end());
  cout << str << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'reverse' was not declared in this scope
    8 |   reverse(str.begin(), str.end());
      |   ^~~~~~~
Language: 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;
}

Compiler output:
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 <cstring>
    3 | #include <string>
Language: 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;
}

Compiler output:
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 unsigned int]' (did you forget the '()' ?)
    6 |         for(int i=str.size-1;i>=0;i--){
      |                   ~~~~^~~~
      |                           ()
Language: 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;
}

Compiler output:
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 '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <string>
  +++ |+#include <cstring>
    3 | int main()
Language: 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;
}

Compiler output:
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>
    3 | using namespace std;
Language: 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;
}

Compiler output:
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
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:2: error: 'srd' has not been declared
    5 |  srd::cin>>a;
      |  ^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main()
{
    string s;
	cin >> s;
	reverse(s.begin(), s.end());
	cout << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'reverse' was not declared in this scope
    9 |         reverse(s.begin(), s.end());
      |         ^~~~~~~
Language: C++

#include<iostream>

using namespace std;

int main(){

   string str;

   cin>>str;

   reverse(str.begin(),str.end());

   cout<<str<<endl;

   return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:4: error: 'reverse' was not declared in this scope
   11 |    reverse(str.begin(),str.end());
      |    ^~~~~~~
Language: C++

#include<stdio.h>
#include <string.h>
int main()
{
    char a[30];
    scanf("%s",&a);
    strrev(a);
    printf("%s\n",a);
    return 0;
}

Compiler output:
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
Language: 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;
}

Compiler output:
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];
      |                     ^~~~~~
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'reverse' was not declared in this scope
   10 |     reverse(a.begin(), a.end());
      |     ^~~~~~~
Language: 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;
}

Compiler output:
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--;){
      |                   ^~~~~~
Language: 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;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'reverse' was not declared in this scope
    9 |         reverse(text.begin(), text.end());
      |         ^~~~~~~
Language: 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;
}

Compiler output:
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);
      |                   ^
Language: 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]);
  }
} 

Compiler output:
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 <cstring>
    3 | #include<string>
Language: 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;
} 

Compiler output:
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 <cstring>
    3 | #include<string>
Language: 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;
} 

Compiler output:
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 <cstring>
    3 | #include<string>
Language: 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;
}

Compiler output:
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>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <stdio.h>
#include <string.h>

int main()
{
   char arr[21];
   gets(arr);
   strrev(arr);
   printf("%s",arr);
   return 0;
}

Compiler output:
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
Language: 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;
}

Compiler output:
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 namespace std;
Language: 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;
}

Compiler output:
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 | #include <string>
Language: 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;
}

Compiler output:
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 | #include <string>