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

#include<iostream>
#include<string>

using namespace std;

int main(){
	string s;
	cin >> s;

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


}

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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define FOR(I,F,N) for(int I = F; I < (int)(N); I++)
#define rep(i, n) FOR(i, 0, n)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};

int main(void){
	string S;
	cin >> S;
	for(int i = S.size(); i--)cout << S[i];
	cout << endl;

	return 0;
}



int StrToInt(string s){
	stringstream ss;
	ss << s;
	int val;
	ss >> val;
	return val;
}
string IntToStr(int i){
	stringstream ss;
	ss << i;
	return ss.str();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:34: error: expected ';' before ')' token
   32 |         for(int i = S.size(); i--)cout << S[i];
      |                                  ^
      |                                  ;
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:8:1: error: 'reverse' was not declared in this scope
    8 | reverse(s.begin(),s.end());
      | ^~~~~~~
Language: C++

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

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

#pragma warning(disable:4996)

int main()
{
	char str[21] = "\0";
	int X;

	scanf("%s", str);

	for (X = strlen(str)-1; X > 0; X--)
	{
		if (X <= (strlen(str) - 1) - X)
			break; 

		str[(strlen(str)-1) - X] ^= str[X];
		str[X] ^= str[(strlen(str)-1) - X];
		str[(strlen(str)-1) - X] ^= str[X];
	}
	printf("%s\n", str);

	return 0;
}
int main()
{
	char str[21] = "\0";
	int X;

	scanf("%s", str);

	for (X = strlen(str)-1; X > 0; X--)
	{
		if (X <= (strlen(str) - 1) - X)
			break; 

		str[(strlen(str)-1) - X] ^= str[X];
		str[X] ^= str[(strlen(str)-1) - X];
		str[(strlen(str)-1) - X] ^= str[X];
	}
	printf("%s\n", str);

	return 0;
}

Compiler output:
a.cc:31:5: error: redefinition of 'int main()'
   31 | int main()
      |     ^~~~
a.cc:11:5: note: 'int main()' previously defined here
   11 | int main()
      |     ^~~~
Language: C++

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

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


int main()
{
	char str[21] = "\0";
	int X;

	scanf("%s", str);

	for (X = strlen(str)-1; X > 0; X--)
	{
		if (X <= (strlen(str) - 1) - X)
			break; 

		str[(strlen(str)-1) - X] ^= str[X];
		str[X] ^= str[(strlen(str)-1) - X];
		str[(strlen(str)-1) - X] ^= str[X];
	}
	printf("%s\n", str);

	return 0;
}
int main()
{
	char str[21] = "\0";
	int X;

	scanf("%s", str);

	for (X = strlen(str)-1; X > 0; X--)
	{
		if (X <= (strlen(str) - 1) - X)
			break; 

		str[(strlen(str)-1) - X] ^= str[X];
		str[X] ^= str[(strlen(str)-1) - X];
		str[(strlen(str)-1) - X] ^= str[X];
	}
	printf("%s\n", str);

	return 0;
}

Compiler output:
a.cc:30:5: error: redefinition of 'int main()'
   30 | int main()
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main()
      |     ^~~~
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class ReverseSequence
    {
        static void Main(string[] args)
        {
            char[] charArray = System.Console.ReadLine().ToCharArray();
            for (int i = charArray.Length - 1; i >= 0; i--)
            {
                System.Console.Write(charArray[i]);
            }
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:10:26: error: 'string' has not been declared
   10 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
   10 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:18:6: error: expected ';' after class definition
   18 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApplication1::ReverseSequence::Main(int*)':
a.cc:12:17: error: structured binding declaration cannot have type 'char'
   12 |             char[] charArray = System.Console.ReadLine().ToCharArray();
      |                 ^~
a.cc:12:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:12:17: error: empty structured binding declaration
a.cc:12:20: error: expected initializer before 'charArray'
   12 |             char[] charArray = System.Console.ReadLine().ToCharArray();
      |                    ^~~~~~~~~
a.cc:13:26: error: 'charArray' was not declared in this scope
   13 |             for (int i = charArray.Length - 1; i >= 0; i--)
      |                          ^~~~~~~~~
a.cc:15:17: error: 'System' was not declared in this scope
   15 |                 System.Console.Write(charArray[i]);
      |                 ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	char str[25];
	char ans[25];
	int x;
	for (int i = 0;i<25;i++) {
	    str[i]='$';
	}
	cin >> str;
	for (int i = 0;i<25;i++) {
		if (str[i]='$') {
			x=i;
			break;
		}
	}
	for (int i = 0;i<(x+1)) {
		cout << str[x-i];
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:31: error: expected ';' before ')' token
   19 |         for (int i = 0;i<(x+1)) {
      |                               ^
      |                               ;
Language: C++

#include <iostream>
using namespace std;
#include <conio.h>
#include <stdio.h>

void reverse(char *);
int main()
{

	
	char str[20];
	gets(str);
	reverse(str);
   getch();

}
void reverse(char *str)
{
	char *p=str;
   *p++;
	if(*p) reverse(p);
   cout << *str;
   
}

Compiler output:
a.cc:3:10: fatal error: conio.h: No such file or directory
    3 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <conio.h>
#include <stdio.h>
#include <iostream>
using namespace std;



void reverse(char *);
int main()
{

	
	char str[20];
	gets(str);
	reverse(str);
	

}

void reverse(char *str)
{
	char *p=str;
   *p++;
	if(*p) reverse(p);
   cout << *str;
   
}

Compiler output:
a.cc:1:10: fatal error: conio.h: No such file or directory
    1 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++


#include "conio.h"
#include "stdio.h"
#include "string.h"
#include "iostream"
using namespace std;
int main(){
int z=0;
char a[255],b[255];
cin.get(a,255);
z=strlen(a)-1;
for(int i=0;i<255;i++)
b[z-i]=a[i];
puts(b);
getch();
return 0;
}

Compiler output:
a.cc:2:10: fatal error: conio.h: No such file or directory
    2 | #include "conio.h"
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>

using namespace std;
int a;
char test[20];
char temp;

int main()
{
	scanf("%s",test);
	for(a=strlen(test)-1;a>=0;a--)
	printf("%c",test[a]);
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'strlen' was not declared in this scope
   15 |         for(a=strlen(test)-1;a>=0;a--)
      |               ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <algorithm>
  +++ |+#include <cstring>
    6 |
Language: C++

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>

using namespace std;
int a;
char test[20];
char temp;

int main()
{
	scanf("%s",test);
	for(a=strlen(test)-1;a>=0;a--)
	{
	printf("%c",test[a]);
	}
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'strlen' was not declared in this scope
   15 |         for(a=strlen(test)-1;a>=0;a--)
      |               ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <algorithm>
  +++ |+#include <cstring>
    6 |
Language: C++

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

using namespace std;
int a;
char test[20];
char temp;

int main()
{
	scanf("%s",test);
	for(a=strlen(test)-1;a>=0;a--)
	{
	printf("%c",test[a]);
	}
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'strlen' was not declared in this scope
   13 |         for(a=strlen(test)-1;a>=0;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 |
Language: C++

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

using namespace std;
int a;
char test[21];
char temp;

int main()
{
	scanf("%s",test);
	for(a=strlen(test)-1;a>=0;a--)
	{
	printf("%c",test[a]);
	}
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'strlen' was not declared in this scope
   13 |         for(a=strlen(test)-1;a>=0;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 |
Language: C++

#include<iostream>
#include<cstring>
#include<string>

int main(){
	std::string str;
	cin >> str;

	for(int i = str.length()-1; i >= 0 ; --i)
		std::cout << str.at(i);

	std::cout << std::endl;


  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> str;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<string>

int main(){
	std::bacic_string st;
	std::cin >> st;
	
	while(!(st.empty())){
		std::cout << st.back();
		st.pop_back();
	}
	std::cout << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'bacic_string' is not a member of 'std'
    5 |         std::bacic_string st;
      |              ^~~~~~~~~~~~
a.cc:6:21: error: 'st' was not declared in this scope; did you mean 'std'?
    6 |         std::cin >> st;
      |                     ^~
      |                     std
Language: C++

#include<iostream>
#include<string>

int main(){
	std::string st;
	std::cin >> st;
	
	while(!(st.empty())){
		std::cout << st.back();
		std::st.pop_back();
	}
	std::cout << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: 'st' is not a member of 'std'
   10 |                 std::st.pop_back();
      |                      ^~
Language: C++

#include <iostream>

int main() {
	char str[21];
	std::cin >> str;

	for (int i = strlen(str) - 1; i >= 0; i--)
			std::cout << str[i];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'strlen' was not declared in this scope
    7 |         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 |
Language: C++

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

int main()
{
	char str[20];
	int i;
	
	gets(str);
	
	for(i=strlen(str)-1; i>=0; i--) cout << 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<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
using namespace std;

int main() {
	string str;
	cin >> str;
	for (int i = str.size() - 1; i >= 0; i--) {
		cout << str[i]???<<endl;
	}

	return 0;
}

Compiler output:
a.cc:12:32: warning: trigraph ??< ignored, use -trigraphs to enable [-Wtrigraphs]
   12 |                 cout << str[i]???<<endl;
a.cc: In function 'int main()':
a.cc:12:32: error: expected primary-expression before '?' token
   12 |                 cout << str[i]???<<endl;
      |                                ^
a.cc:12:33: error: expected primary-expression before '?' token
   12 |                 cout << str[i]???<<endl;
      |                                 ^
a.cc:12:34: error: expected primary-expression before '<<' token
   12 |                 cout << str[i]???<<endl;
      |                                  ^~
a.cc:12:40: error: expected ':' before ';' token
   12 |                 cout << str[i]???<<endl;
      |                                        ^
      |                                        :
a.cc:12:40: error: expected primary-expression before ';' token
a.cc:12:40: error: expected ':' before ';' token
   12 |                 cout << str[i]???<<endl;
      |                                        ^
      |                                        :
a.cc:12:40: error: expected primary-expression before ';' token
a.cc:12:40: error: expected ':' before ';' token
   12 |                 cout << str[i]???<<endl;
      |                                        ^
      |                                        :
a.cc:12:40: error: expected primary-expression before ';' token
Language: C++

#include<iostream>
#include<string>


using namespace std;

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

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

#include <iostream>
#include <string>

int main(){
	std::string str;
	std::cin >> str; // input
	
	str.reverse(); //use reverse function
	std::cout << str << std::endl; // output
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    8 |         str.reverse(); //use reverse function
      |             ^~~~~~~
      |             reserve
Language: C++

#include<iostream>
using namespace std;
int main(){
	vector<char> s;
	char c[256];
	cin >> c;
	for (int i = 0; c[i] != NULL; i++)
	{
		s.push_back(c[i]);
	}
	if (s.size() <= 20){
		for (int i = 1; i < s.size(); i++)
		{
			int a = s.size();
			cout << s[a - i];
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'vector' was not declared in this scope
    4 |         vector<char> s;
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:4:16: error: expected primary-expression before 'char'
    4 |         vector<char> s;
      |                ^~~~
a.cc:7:33: warning: NULL used in arithmetic [-Wpointer-arith]
    7 |         for (int i = 0; c[i] != NULL; i++)
      |                                 ^~~~
a.cc:9:17: error: 's' was not declared in this scope
    9 |                 s.push_back(c[i]);
      |                 ^
a.cc:11:13: error: 's' was not declared in this scope
   11 |         if (s.size() <= 20){
      |             ^
Language: C++

#include<stdio.h>
  int main(void){
   char n[100]={0};
      int i=20;
      scanf("%s",n);
      for(i;i<n;i--){
        if(n[i]!=0)printf("%c",n[i]);
      }
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |       for(i;i<n;i--){
      |             ~^~
Language: C++

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

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

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

#include <iostream>
#include <string>
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:8:1: error: 'reverse' was not declared in this scope
    8 | reverse(str.begin(),str.end());
      | ^~~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  char s[21];
  cin >> s;
  int len = strlen(s);
  for(int i = len;i >= 0;i--){
    cout << s[i] << endl;
  }
}

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

#include<iostream>
#include<string>
using namespace std;
int main()
{
  char s[21];
  cin >> s;
  int len = strlen(s);
  for(int i = len;i >= 0;i--){
    cout << s[i];
  }
  cout << endl;
}

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

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  char s[21];
  cin >> s;

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

  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: request for member 'begin' in 's', which is of non-class type 'char [21]'
    9 |   reverse(s.begin(),s.end());
      |             ^~~~~
a.cc:9:23: error: request for member 'end' in 's', which is of non-class type 'char [21]'
    9 |   reverse(s.begin(),s.end());
      |                       ^~~
Language: C++

#include<stdio.h>
#include<string.h>
int main(){
int i;
char s[50];
scnaf("%s",s);
for(i=strlen(s)-1;i>-1;i--)printf("%c",s[i]);
printf("\n");
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
    6 | scnaf("%s",s);
      | ^~~~~
      | scanf
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  char str[21];
  cin >> str;
  for(int i = strlen(str);i>=0;i--){
    cout << str[i];
  }
  cout << endl;
}

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

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

int main()
{
    char a[100];
    gets(a);
    printf("%s",strrev(a));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(a);
      |     ^~~~
      |     getw
a.cc:8:17: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
    8 |     printf("%s",strrev(a));
      |                 ^~~~~~
      |                 strsep
Language: C++

#include <iostream>
#include <string>
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:10:5: error: 'reverse' was not declared in this scope
   10 |     reverse(str.begin(), str.end());
      |     ^~~~~~~
Language: C++

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

#include "mathematical.h"

int main(void)
{
  std::string str;
  std::cin >> str;
  
  std::string rev;
  for (int i = str.size() - 1; i >= 0; i--) {
    rev.push_back(str[i]);
  }
  
  std::cout << rev << std::endl;
  
  return 0;
}

Compiler output:
a.cc:5:10: fatal error: mathematical.h: No such file or directory
    5 | #include "mathematical.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>

int main(){
char str[21],i;
scanf("%s"str);
for(i=0;;i++){
if(str[i]==/0)
break;
}
for(;i>0;i--){
printf("%s",str[i]);
}
printf("\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: unable to find string literal operator 'operator""str' with 'const char [3]', 'long unsigned int' arguments
    5 | scanf("%s"str);
      |       ^~~~~~~
a.cc:7:12: error: expected primary-expression before '/' token
    7 | if(str[i]==/0)
      |            ^
Language: C++

#include<stdio.h>

int main(){
char str[21],i;
scanf("%s",str);
for(i=0;;i++){
if(str[i]==/0)
break;
}
for(;i>0;i--){
printf("%s",str[i]);
}
printf("\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '/' token
    7 | if(str[i]==/0)
      |            ^
Language: C++

#include<stdio.h>
int main(){
char str[21];
int i;
scanf("%s",str);
for(i=0;;i++){
if(str[i]==/0)
break;
}
for(;i>0;i--){
printf("%s",str[i]);
}
printf("\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '/' token
    7 | if(str[i]==/0)
      |            ^
Language: C++

#include<stdio.h>
int main(){
char str[21];
int i;
scanf("%s",str);
for(i=0;i=100;i++){
if(str[i]==/0)
i=100
}
for(;i>0;i--){
printf("%s",str[i]);
}
printf("\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '/' token
    7 | if(str[i]==/0)
      |            ^
a.cc:8:6: error: expected ';' before '}' token
    8 | i=100
      |      ^
      |      ;
    9 | }
      | ~
Language: C++

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

int main(){

string x;
cin >> x;
vector<char> c;
for(int i = 0;i < x.size(); ++i)
{
 c.push_back(x[i]);
}
for(int i = c.size()-1; i > 0; --i)
{
 cout << c[i];
}

cout << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'vector' was not declared in this scope
    9 | vector<char> c;
      | ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <iostream>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:9:8: error: expected primary-expression before 'char'
    9 | vector<char> c;
      |        ^~~~
a.cc:12:2: error: 'c' was not declared in this scope
   12 |  c.push_back(x[i]);
      |  ^
a.cc:14:13: error: 'c' was not declared in this scope
   14 | for(int i = c.size()-1; i > 0; --i)
      |             ^
Language: C++

#include <stdio.h>
#include <string.h>
int main()
{
   char a[20];
   gets(a);
   strrev(a);
   printf("%s\n",a);

   return 0;
}

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

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

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

#include<stdio.h>
#include<conio.h>
int main()
{
 int i,count=0;
 char ch[20];
 gets(ch);
 for(i=0;ch[i]!='\0';i++)
 {
  count++;
 }
 for(i=count-1;i>=0;i--)
 {
   printf("%c",ch[i]);
 }
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define MAX 12345
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define rev(i,a,b) for(int i=a;i>=b;i--)

int main()
{
    string str;

    while(cin>>str){
        ll l=str.size();
        while(l--){
            cout << str[len];
        }
        cout << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'len' was not declared in this scope
   16 |             cout << str[len];
      |                         ^~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
string str;
cin>>str;
for(int i=str.size()-1;i=>0;i--){
cout<<str[i]<<endl;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before '>' token
    7 | for(int i=str.size()-1;i=>0;i--){
      |                          ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
  string str;
  while (cin >> str) {
    cout << str.reverse() << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    7 |     cout << str.reverse() << endl;
      |                 ^~~~~~~
      |                 reserve
Language: C++

import std.stdio,
    std.array,
    std.conv,
    std.string;

void main(){
  string s;
  for(;;){
    s=readln();
    if(stdin.eof()) break;
    for(int i = s.length; i > 0; --i ){
      write(s[i-1]);
    }
    write("\n");
  }

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio,
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: '::main' must return 'int'
    6 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string s;
      |   ^~~~~~
a.cc:9:5: error: 's' was not declared in this scope
    9 |     s=readln();
      |     ^
a.cc:9:7: error: 'readln' was not declared in this scope
    9 |     s=readln();
      |       ^~~~~~
a.cc:10:8: error: 'stdin' was not declared in this scope
   10 |     if(stdin.eof()) break;
      |        ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | import std.stdio,
a.cc:12:7: error: 'write' was not declared in this scope
   12 |       write(s[i-1]);
      |       ^~~~~
a.cc:14:5: error: 'write' was not declared in this scope
   14 |     write("\n");
      |     ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
    char str[21];
    char str121];
    int l=0;
    cin>>Str;
    for(int i=0;str[i]!='\0';)
        i++;
    for(int k=i-l;k>=0;k--,l++)
    {
        cout<<str[k];
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected initializer before ']' token
    7 |     char str121];
      |                ^
a.cc:9:10: error: 'Str' was not declared in this scope; did you mean 'str'?
    9 |     cin>>Str;
      |          ^~~
      |          str
a.cc:12:15: error: 'i' was not declared in this scope
   12 |     for(int k=i-l;k>=0;k--,l++)
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
    char str[21];
    int l=0;
    cin>>Str;
    for(int i=0;str[i]!='\0';)
        i++;
    for(int k=i-l;k>=0;k--,l++)
    {
        cout<<str[k];
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'Str' was not declared in this scope; did you mean 'str'?
    8 |     cin>>Str;
      |          ^~~
      |          str
a.cc:11:15: error: 'i' was not declared in this scope
   11 |     for(int k=i-l;k>=0;k--,l++)
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
    char str[21];
    int l=0;
    cin>>str;
    for(int i=0;str[i]!='\0';)
        i++;
    for(int k=i-l;k>=0;k--,l++)
    {
        cout<<str[k];
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'i' was not declared in this scope
   11 |     for(int k=i-l;k>=0;k--,l++)
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
    char str[21];
    int l=0;
    cin>>str;
    for(int i=0;str[i]!='\0';)
        i++;
    for(int k=i-1;k>=0;k--)
    {
        cout<<str[k];
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'i' was not declared in this scope
   11 |     for(int k=i-1;k>=0;k--)
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
    char str[21];
    cin>>str;
    for(int i=0;str[i]!='\0';)
        i++;
    for(int k=i-1;k>=0;k--)
    {
        cout<<str[k];
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'i' was not declared in this scope
   10 |     for(int k=i-1;k>=0;k--)
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s;
      |   ^~~~~~
a.cc:4: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:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   while(getline(cin, s)) {
      |                 ^~~
      |                 std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:22: error: 's' was not declared in this scope
    5 |   while(getline(cin, s)) {
      |                      ^
a.cc:6:5: error: 'reverse' was not declared in this scope
    6 |     reverse(s.begin(), s.end());
      |     ^~~~~~~
a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << s << 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:7:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     cout << s << 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 <iostream>
#include <string>
using namespace std;
int main() {
  string s;
  while(getline(cin, s)) {
    reverse(s.begin(), s.end());
    cout << s << endl;
  }
  return 0;
}

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

#include <iostream>
#include <string>
using namespace std;
int main() {
  string s;
  while(getline(cin, s)) {
    // reverse(s.begin(), s.end());
    vector<int> v;
    v.push_back(3);
    reverse(v.begin(), v.end());
    cout << s << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<int> v;
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #include <string>
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> v;
      |            ^~~
a.cc:9:5: error: 'v' was not declared in this scope
    9 |     v.push_back(3);
      |     ^
a.cc:10:5: error: 'reverse' was not declared in this scope
   10 |     reverse(v.begin(), v.end());
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
  string s;
  while(getline(cin, s)) {
    // reverse(s.begin(), s.end());
    vector<int> v;
    v.push_back(3);
    std::reverse(v.begin(), v.end());
    cout << s << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<int> v;
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #include <string>
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> v;
      |            ^~~
a.cc:9:5: error: 'v' was not declared in this scope
    9 |     v.push_back(3);
      |     ^
a.cc:10:10: error: 'reverse' is not a member of 'std'
   10 |     std::reverse(v.begin(), v.end());
      |          ^~~~~~~
Language: C++

#include <iostream>
#include <string>
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:8:5: error: 'reverse' was not declared in this scope
    8 |     reverse(str.begin(), str.end());
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

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

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

#include <iostream>
#include <string>

using namespace std;

int main(){
	string s;
	cin >> s;

	for(int i=s.size(); i--){
		cout << s[i];
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: expected ';' before ')' token
   10 |         for(int i=s.size(); i--){
      |                                ^
      |                                ;
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:10:5: error: 'reverse' was not declared in this scope
   10 |     reverse(str.begin(), str.end());
      |     ^~~~~~~
Language: C++

#include <stdio.h> #include <iostream> using namespace std; /* * */ int main(int argc, char** argv) { long long n; scanf("%lld",&n); printf("%lld",n%10); for (int i=10;i<n;) { i=10*i; printf("%lld",((n%i)-(n%(i/10)))/(i/10)); } return 0; } 

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> #include <iostream> using namespace std; /* * */ int main(int argc, char** argv) { long long n; scanf("%lld",&n); printf("%lld",n%10); for (int i=10;i<n;) { i=10*i; printf("%lld",((n%i)-(n%(i/10)))/(i/10)); } return 0; }
      |                    ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    char name[25];
    gets(name);
    int len = strlen(name);

    for(int i= len-1; i>=0; i--)
        cout << name[i] ;
    cout << endl;
    return 0;
}

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

#include <stdio.h>
#include <string.h>
int main ()
{
    char x [10000];
    gets (x);
    strrev (x);
    puts(x);
    return 0 ;
}

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

#include <iostream>
#include <string> 
#include <utility>

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:12:9: error: 'reverse' was not declared in this scope
   12 |         reverse(s.begin(), s.end());
      |         ^~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
 char str[20];
 int i;
 cin>>str;
 for(i=strlen(str)-1;i>=0;i--){
	cout<<str[i];
 }
 cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'strlen' was not declared in this scope
    8 |  for(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>
using namespace std;
int main(){
	string s;
	cin>>s;
	for(int i=0;i<20;i++){
		cout<<s[20-1-i]<;
	}
	cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected primary-expression before ';' token
    8 |                 cout<<s[20-1-i]<;
      |                                 ^
Language: C++

#include <stdio.h>

int main(void){
	char buff[128];
	char *p;
	scanf("%s",buff);
	p=buff;
	p=p+strlen(buff);
	while(p!=buff){
		putchar(*(--p));
	}
	putchar('\n');
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'strlen' was not declared in this scope
    8 |         p=p+strlen(buff);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {  string a = Console.ReadLine(); int b = a.Length;
            for (; b > 0; b--)
            { Console.Write(a[b]); }
            Console.WriteLine();
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:10:26: error: 'string' has not been declared
   10 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
   10 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:16:6: error: expected ';' after class definition
   16 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApplication1::Program::Main(int*)':
a.cc:11:12: error: 'string' was not declared in this scope
   11 |         {  string a = Console.ReadLine(); int b = a.Length;
      |            ^~~~~~
a.cc:11:51: error: 'a' was not declared in this scope
   11 |         {  string a = Console.ReadLine(); int b = a.Length;
      |                                                   ^
a.cc:13:15: error: 'Console' was not declared in this scope
   13 |             { Console.Write(a[b]); }
      |               ^~~~~~~
a.cc:14:13: error: 'Console' was not declared in this scope
   14 |             Console.WriteLine();
      |             ^~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'i' was not declared in this scope
    6 | for(i = strlen(str) - 1;i >= 0;i--){
      |     ^
Language: C++

#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
	char str[21];
	int tmp;
	cin >> str;
	tmp=strlen(str);
	for (int i = tmp-1; i >=0; i--) {
		cout << str[i];
	}
	cout << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'strlen' was not declared in this scope
   14 |         tmp=strlen(str);
      |             ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <algorithm>
  +++ |+#include <cstring>
    5 | #include <string>
Language: C++

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

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

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		char[] data = str.toCharArray();

		StringBuffer sb = new StringBuffer(str);
		str = sb.reverse().toString();
		System.out.println(str);
	}
}

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

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

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'strlen' was not declared in this scope
   10 |   int l = strlen(str);
      |           ^~~~~~
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 | #include<string>
Language: C++

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

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'strlen' was not declared in this scope
   10 |   int l = strlen(str);
      |           ^~~~~~
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 | #include<string>
Language: C++

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

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |   int l = strlen(str);
      |                  ^~~
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:4:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'strlen' was not declared in this scope
   10 |   int l = strlen(str);
      |           ^~~~~~
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 | #include<string>
Language: C++

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

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'strlen' was not declared in this scope
   11 |   int l = strlen(str);
      |           ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<algorithm>
  +++ |+#include <cstring>
    5 | #include<string>
Language: C++

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

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'strlen' was not declared in this scope
    8 |   int 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 | #include<string>
Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |   int l = strlen(str);
      |                  ^~~
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~