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

#include<cstdio>
#include<iostream>
#include<vector>

using namespace std;

int main(void){
	while (1){
		int n;
		scanf_s("%d", &n);
		if (n == 0)return 0;
		vector<char> code1;
		vector<char> code2;
		for (int i = 0; i < n; i++){
			char a, b;
			scanf_s(" %c", &a);
			scanf_s(" %c", &b);
			code1.push_back(a);
			code2.push_back(b);
		}
		int m;
		scanf_s("%d", &m);
		vector<char> ans;
		for (int i = 0; i < m; i++){
			char a;
			scanf_s(" %c", &a);
			ans.push_back(a);
			for (int j = 0; j < n; j++){
				if (ans[i] == code1[j]){
					ans[i] = code2[j];
					break;
				}
			}
			printf("%c", ans[i]);
		}
		printf("\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
Language: C++

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


int main(){
	string answers="";
//	string tables="";
	int number=0;
	while(1){
		cin >> number;
		if(number==0){break;}

		string table="";
		string answer="";
		for (int i=0;i<number;i++){
			string a,b;
			cin >> a >> b;
			table+=a+b;
		}
		tables+=table+ "\n";
		cin >> number;
		for (int i=0;i<number;i++){
			string a;
			cin >> a;
			for(int i=0;i<table.length()/2;i++){
				if (table.substr(i*2,1)==a){
					a=table.substr(i*2+1,1);
					break;
				}
			}
			answer+=a;
		}
		answers += answer+"\n";
	}
	cout << answers ;
//	cout << tables ;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 'tables' was not declared in this scope; did you mean 'table'?
   21 |                 tables+=table+ "\n";
      |                 ^~~~~~
      |                 table
Language: C++

3	
A a	
0 5	
5 4	
10	
A	
B	
C	
0	
1	
4	
5	
a	
b	
A
3	
A a	
0 5	
5 4	
10	
A	
B	
C	
0	
1	
4	
5	
a	
b	
A
0

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 3
      | ^
Language: C++

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<iostream>
using namespace std;
int main(void){
int n,m;
char c[256],a,b;
while(1){
scanf("%d",&n);
if(n==0){break;}
for(int i=0;i<256;i++){
c[i]=0;
}

for(int i=0;i<n;i++){
scanf("%c%c",&a,&b);
c[a]=b;
}
scanf("%d",&m);

for(int i=0;i<m;i++){
scanf("%c",&a);
if(c[a]){printf("%c",a)}
else{ printf("%c",f)    }

}
printf("\n");
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: expected ';' before '}' token
   24 | if(c[a]){printf("%c",a)}
      |                        ^
      |                        ;
a.cc:25:19: error: 'f' was not declared in this scope
   25 | else{ printf("%c",f)    }
      |                   ^
Language: C++

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<iostream>
using namespace std;
int main(void){
int n,m;
char c[256],a,b;
while(1){
scanf("%d",&n);
if(n==0){break;}
for(int i=0;i<256;i++){
c[i]=0;
}

for(int i=0;i<n;i++){
scanf("%c%c",&a,&b);
c[a]=b;
}
scanf("%d",&m);

for(int i=0;i<m;i++){
scanf("%c",&a);
if(c[a]){printf("%c",a);}
else{ printf("%c",f) ;   }

}
printf("\n");
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: 'f' was not declared in this scope
   25 | else{ printf("%c",f) ;   }
      |                   ^
Language: C++

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

#define for(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) for(int i=0;i<(n);i++)

int main() {
	
	int n, m;
	
	while(cin>>n,n){
		char ts[256] = {};
		rep(i, n) {
			char f, t;
			cin>>f>>t;
			ts[f]=t;
		}
		cin>>m;
		rep(i, m) {
			char w;
			cin>>w;
			cout<<ts[w];
		}
		cout<<endl;
	}
	
	return 0;
}

Compiler output:
a.cc:14:25: error: macro "for" requires 3 arguments, but only 1 given
   14 |                 rep(i, n) {
      |                         ^
a.cc:5:9: note: macro "for" defined here
    5 | #define for(i,a,b) for(int i=(a);i<(b);i++)
      |         ^~~
a.cc:20:25: error: macro "for" requires 3 arguments, but only 1 given
   20 |                 rep(i, m) {
      |                         ^
a.cc:5:9: note: macro "for" defined here
    5 | #define for(i,a,b) for(int i=(a);i<(b);i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:14:27: error: expected '(' before '{' token
   14 |                 rep(i, n) {
      |                           ^
      |                           (
a.cc:14:27: error: expected primary-expression before '{' token
a.cc:6:18: error: expected primary-expression before 'for'
    6 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                  ^~~
a.cc:20:17: note: in expansion of macro 'rep'
   20 |                 rep(i, m) {
      |                 ^~~
a.cc:19:24: error: expected ')' before 'for'
   19 |                 cin>>m;
      |                        ^
      |                        )
a.cc:14:27: note: to match this '('
   14 |                 rep(i, n) {
      |                           ^
a.cc:20:27: error: expected '(' before '{' token
   20 |                 rep(i, m) {
      |                           ^
      |                           (
a.cc:20:27: error: expected primary-expression before '{' token
a.cc:26:9: error: expected primary-expression before '}' token
   26 |         }
      |         ^
a.cc:25:28: error: expected ')' before '}' token
   25 |                 cout<<endl;
      |                            ^
      |                            )
   26 |         }
      |         ~                   
a.cc:20:27: note: to match this '('
   20 |                 rep(i, m) {
      |                           ^
a.cc:26:9: error: expected primary-expression before '}' token
   26 |         }
      |         ^
Language: C++

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

#define for(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) for(int i=0;i<(n);i++)

int main() {
	
	int n, m;
	
	while(cin>>n,n){
		char ts[256] = {};
		rep(i, n) {
			char f, t;
			cin>>f>>t;
			ts[f+0]=t;
		}
		cin>>m;
		rep(i, m) {
			char w;
			cin>>w;
			cout<<ts[w+0];
		}
		cout<<endl;
	}
	
	return 0;
}

Compiler output:
a.cc:14:25: error: macro "for" requires 3 arguments, but only 1 given
   14 |                 rep(i, n) {
      |                         ^
a.cc:5:9: note: macro "for" defined here
    5 | #define for(i,a,b) for(int i=(a);i<(b);i++)
      |         ^~~
a.cc:20:25: error: macro "for" requires 3 arguments, but only 1 given
   20 |                 rep(i, m) {
      |                         ^
a.cc:5:9: note: macro "for" defined here
    5 | #define for(i,a,b) for(int i=(a);i<(b);i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:14:27: error: expected '(' before '{' token
   14 |                 rep(i, n) {
      |                           ^
      |                           (
a.cc:14:27: error: expected primary-expression before '{' token
a.cc:6:18: error: expected primary-expression before 'for'
    6 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                  ^~~
a.cc:20:17: note: in expansion of macro 'rep'
   20 |                 rep(i, m) {
      |                 ^~~
a.cc:19:24: error: expected ')' before 'for'
   19 |                 cin>>m;
      |                        ^
      |                        )
a.cc:14:27: note: to match this '('
   14 |                 rep(i, n) {
      |                           ^
a.cc:20:27: error: expected '(' before '{' token
   20 |                 rep(i, m) {
      |                           ^
      |                           (
a.cc:20:27: error: expected primary-expression before '{' token
a.cc:26:9: error: expected primary-expression before '}' token
   26 |         }
      |         ^
a.cc:25:28: error: expected ')' before '}' token
   25 |                 cout<<endl;
      |                            ^
      |                            )
   26 |         }
      |         ~                   
a.cc:20:27: note: to match this '('
   20 |                 rep(i, m) {
      |                           ^
a.cc:26:9: error: expected primary-expression before '}' token
   26 |         }
      |         ^
Language: C++

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

int ushi;
int shika;
char uma;
int hiru;
long char a[100000000];
long char b[100000000];
int main(){
	cin >> ushi;
	for (int i = 0; i < ushi; i++){
		cin >> a[i] >> b[i];
	}
	cin >> shika;
	for (int j = 0; j < shika; j++){
		cin >> uma;
		hiru = 0;
		for (int k = 0; k < ushi;k++){
			if (uma == a[k]){
				cout << b[k];
				hiru = 1;
			}
		}
		if (hiru == 0){
			cout << uma;
		}
	}
	cout << endl;
}

Compiler output:
a.cc:9:1: error: 'long' specified with 'char'
    9 | long char a[100000000];
      | ^~~~
a.cc:10:1: error: 'long' specified with 'char'
   10 | long char b[100000000];
      | ^~~~
Language: C++

#include,iostream>
using namespace std;

char T[25000][2];
char S;
int main(){
int n,m;
while(true){
cin>>n;
if(n==0){
break;
}
for(int i-0;i<n;i++){
cin>>T[i][0]>>T[i][1];
}
cin>>m;
for(int i=0;i<m;i++){
cin>>S;
for(int j=0;j<n;j++){
	if(T[j][0]==S){
	cout<<T[j][1];
	goto Exit;
	}
}
cout<<S;
Exit:;
}
cout<<endl;
}
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include,iostream>
      |         ^
a.cc: In function 'int main()':
a.cc:9:1: error: 'cin' was not declared in this scope
    9 | cin>>n;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include,iostream>
a.cc:13:10: error: expected ';' before '-' token
   13 | for(int i-0;i<n;i++){
      |          ^
      |          ;
a.cc:13:16: error: expected ')' before ';' token
   13 | for(int i-0;i<n;i++){
      |    ~           ^
      |                )
a.cc:13:17: error: 'i' was not declared in this scope
   13 | for(int i-0;i<n;i++){
      |                 ^
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout<<T[j][1];
      |         ^~~~
a.cc:21:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:1: error: 'cout' was not declared in this scope
   25 | cout<<S;
      | ^~~~
a.cc:25:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:1: error: 'cout' was not declared in this scope
   28 | cout<<endl;
      | ^~~~
a.cc:28:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:7: error: 'endl' was not declared in this scope
   28 | 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 | #include,iostream>
Language: C++

#include<iostream>

 using namespace std;

 int main(){

 int a, mozi;
 cin >> a ;

 int wrong[a], right[a];
 for(int i=0; i < a; i++){
 cin >> wrong[i] >> right[i];
 }
 cin >> mozi;
 int mozire[mozi];
 for(int j=0; j < mozi; j++){
 cin >> mozire[j];
 for(int f=0; f < a; f++)
 if(mozire[j] == wrong[f])
 mozire[j] = right[f];
 }
 for(int e = 0; e < mozi; e++)
 cout << mozire[e];
 cout << stdl;

 return 0;
 }

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

#include <cstdio>
int main(){
 char key,val,table[256];
 int n,m,i,d;
 scanf("%d",&n);
 while(n>0){
  for(i=0;i<256;i++) table[i]=i;
  for(i=0;i<n;k++){
   scanf("%c %c",&key,&val);
   table[key]=val;
  };
  scanf("%d",&m);
  for(i=0;i<m;i++){
   scanf("%c",&d);
   printf("%c",table[d]);
  }
  printf("\n");
  scanf("%d",&n);
 };
 return 0;
}:

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: 'k' was not declared in this scope
    8 |   for(i=0;i<n;k++){
      |               ^
a.cc: At global scope:
a.cc:21:2: error: expected unqualified-id before ':' token
   21 | }:
      |  ^
Language: C++

#include <cstdio>
int main(){
 char key,val,table[256];
 int n,m,i;
 char d;
 scanf("%d",&n);
 while(n>0){
  for(i=0;i<256;i++) table[i]=i;
  for(i=0;i<n;k++){
   scanf("%c %c",&key,&val);
   table[key]=val;
  };
  scanf("%d",&m);
  for(i=0;i<m;i++){
   scanf("%c",&d);
   printf("%c",table[d]);
  }
  printf("\n");
  scanf("%d",&n);
 };
 return 0;
}:

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'k' was not declared in this scope
    9 |   for(i=0;i<n;k++){
      |               ^
a.cc: At global scope:
a.cc:22:2: error: expected unqualified-id before ':' token
   22 | }:
      |  ^
Language: C++

#include <unordered_map> 
#include <iostream>

using namespace std;

int main()
{
	unordered_map<char, char> mp;
	char a,b,c,d[100000];
	string x;
	int n;
	do{
		cin >> n;
		do{
			cin >> a >> b;
			mp[a] = b;
		} while (--n);
		
		cin >> n;
		do{
			cin >> c;
			if (mp[c] != NULL) {
				x += mp[c];
			}
			else {
				x += c;
			}
		} while (--n);	
		strcpy_s(d, x.c_str());
		cout << d << endl;
	} while (c != 0);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith]
   22 |                         if (mp[c] != NULL) {
      |                                      ^~~~
a.cc:29:17: error: 'strcpy_s' was not declared in this scope
   29 |                 strcpy_s(d, x.c_str());
      |                 ^~~~~~~~
Language: C++

#include <map> 
#include <iostream>

using namespace std;

int main()
{
	map<char, char> mp;
	char a,b,c,d[100000];
	string x;
	int n;
	do{
		cin >> n;
		do{
			cin >> a >> b;
			mp[a] = b;
		} while (--n);
		
		cin >> n;
		do{
			cin >> c;
			if (mp[c] != NULL) {
				x += mp[c];
			}
			else {
				x += c;
			}
		} while (--n);	
		strcpy_s(d, x.c_str());
		cout << d << endl;
	} while (c != 0);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith]
   22 |                         if (mp[c] != NULL) {
      |                                      ^~~~
a.cc:29:17: error: 'strcpy_s' was not declared in this scope
   29 |                 strcpy_s(d, x.c_str());
      |                 ^~~~~~~~
Language: C++

#include <map> 
#include <iostream>

using namespace std;

int main()
{
	map<char, char> mp;
	char a,b,c,d[100000];
	string x;
	int n;
	do{
		cin >> n;
		do{
			cin >> a >> b;
			mp[a] = b;
		} while (--n);
		
		cin >> n;
		do{
			cin >> c;
			if (mp[c] != NULL) {
				x += mp[c];
			}
			else {
				x += c;
			}
		} while (--n);	
		strcpy(d, x.c_str());
		cout << d << endl;
	} while (c != 0);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith]
   22 |                         if (mp[c] != NULL) {
      |                                      ^~~~
a.cc:29:17: error: 'strcpy' was not declared in this scope
   29 |                 strcpy(d, x.c_str());
      |                 ^~~~~~
a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <map> 
#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
	map<char, char> mp;
	char a,b,c,d[100000];
	string x;
	int n;
	do{
		cin >> n;
		do{
			cin >> a >> b;
			mp[a] = b;
		} while (--n);
		
		cin >> n;
		do{
			cin >> c;
			if (mp[c] != NULL) {
				x += mp[c];
			}
			else {
				x += c;
			}
		} while (--n);	
		strcpy(d, x.c_str());
		cout << d << endl;
	} while (c != 0);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith]
   22 |                         if (mp[c] != NULL) {
      |                                      ^~~~
a.cc:29:17: error: 'strcpy' was not declared in this scope
   29 |                 strcpy(d, x.c_str());
      |                 ^~~~~~
a.cc:4:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdlib>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

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

int main()
{
	map<char, char> mp;
	char a,b,c,d[100000];
	string x;
	int n;
	do{
		cin >> n;
		do{
			cin >> a >> b;
			mp[a] = b;
		} while (--n);
		
		cin >> n;
		do{
			cin >> c;
			if (mp[c] != NULL) {
				x += mp[c];
			}
			else {
				x += c;
			}
		} while (--n);	
		strcpy(d, x.c_str());
		cout << d << endl;
	} while (c != 0);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:38: warning: NULL used in arithmetic [-Wpointer-arith]
   22 |                         if (mp[c] != NULL) {
      |                                      ^~~~
a.cc:29:17: error: 'strcpy' was not declared in this scope
   29 |                 strcpy(d, x.c_str());
      |                 ^~~~~~
a.cc:3:1: note: 'strcpy' 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>
using namespace std;

int main(){
	int n = 0
	while(cin >> n && n){
		int m = 0, henkan[10000] = {};
		char in, iin;
		for(int i = 0; i < n; i++){
			cin >> in >> iin;
			int ctoi = in, ctoii = iin;
			henkan[ctoi] = ctoii;
		}
		cin >> m;
		for(int i = 0; i < m; i++){
			cin >> in;
			int ctoi = in;
			if(henkan[ctoi])
				ctoi = henkan[ctoi];
			cout << (char)ctoi;
		}
		cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ',' or ';' before 'while'
    6 |         while(cin >> n && n){
      |         ^~~~~
Language: C++

include <bits/stdc++.h>

#define REP(i, max)	for(int i = 0, iMax = max; i < iMax; i ++)
using namespace std;

int main(int args, char **ppArgs)
{
	map<char, char>	conversionMap;
	
	// Input conversion tables
	int numTables;
	while(::scanf("%d", &numTables), numTables)
	{
		char	from, to;
		REP(i, numTables)	cin >> from >> to,	conversionMap[from]	= to;
		
		// Input text
		int textLen;
		::scanf("%d", &textLen);
		string	text(textLen, 0);
		REP(i, text.size())
		{
			char ch;
			cin >> ch;
			text[i]	= conversionMap.count(ch) ? conversionMap[ch] : ch;
		}
		::puts(text.c_str());	
	}
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main(int, char**)':
a.cc:8:9: error: 'map' was not declared in this scope
    8 |         map<char, char> conversionMap;
      |         ^~~
a.cc:8:13: error: expected primary-expression before 'char'
    8 |         map<char, char> conversionMap;
      |             ^~~~
a.cc:12:17: error: '::scanf' has not been declared
   12 |         while(::scanf("%d", &numTables), numTables)
      |                 ^~~~~
a.cc:15:41: error: 'cin' was not declared in this scope
   15 |                 REP(i, numTables)       cin >> from >> to,      conversionMap[from]     = to;
      |                                         ^~~
a.cc:15:65: error: 'conversionMap' was not declared in this scope
   15 |                 REP(i, numTables)       cin >> from >> to,      conversionMap[from]     = to;
      |                                                                 ^~~~~~~~~~~~~
a.cc:19:19: error: '::scanf' has not been declared
   19 |                 ::scanf("%d", &textLen);
      |                   ^~~~~
a.cc:20:17: error: 'string' was not declared in this scope
   20 |                 string  text(textLen, 0);
      |                 ^~~~~~
a.cc:21:24: error: 'text' was not declared in this scope; did you mean 'textLen'?
   21 |                 REP(i, text.size())
      |                        ^~~~
a.cc:3:47: note: in definition of macro 'REP'
    3 | #define REP(i, max)     for(int i = 0, iMax = max; i < iMax; i ++)
      |                                               ^~~
a.cc:24:25: error: 'cin' was not declared in this scope
   24 |                         cin >> ch;
      |                         ^~~
a.cc:25:35: error: 'conversionMap' was not declared in this scope
   25 |                         text[i] = conversionMap.count(ch) ? conversionMap[ch] : ch;
      |                                   ^~~~~~~~~~~~~
a.cc:27:19: error: '::puts' has not been declared
   27 |                 ::puts(text.c_str());
      |                   ^~~~
a.cc:27:24: error: 'text' was not declared in this scope; did you mean 'textLen'?
   27 |                 ::puts(text.c_str());
      |                        ^~~~
      |                        textLen
Language: C++

//#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>

using namespace std;

#define REP(i, max)	for(int i = 0, iMax = max; i < iMax; i ++)
#define MAX_TEXT_LEN	1e+5

int main(int args, char **ppArgs)
{
	int numTables;
	
	while(::scanf("%d", &numTables), numTables)
	{
		// Input conversion tables
		map<char, char>	conversionMap;	// DO NOT FORGET TO RESET!!
		char	from, to;
		REP(i, numTables)	cin >> from >> to,	conversionMap[from]	= to;
		
		// Input text
		int textLen;
		::scanf("%d", &textLen);
		char text[MAX_TEXT_LEN];
//		string	text(textLen, 0);
		REP(i, textLen)
		{
			char ch;
			cin >> ch;
			text[i]	= conversionMap.count(ch) ? conversionMap[ch] : ch;
		}
		//::puts(text.c_str());
		text[textLen]	= 0;
		::puts(text);
	}
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:25: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   10 | #define MAX_TEXT_LEN    1e+5
      |                         ^~~~
a.cc:26:27: note: in expansion of macro 'MAX_TEXT_LEN'
   26 |                 char text[MAX_TEXT_LEN];
      |                           ^~~~~~~~~~~~
a.cc:10:25: error: could not convert '1.0e+5' from 'double' to 'long unsigned int'
   10 | #define MAX_TEXT_LEN    1e+5
      |                         ^~~~
      |                         |
      |                         double
a.cc:26:27: note: in expansion of macro 'MAX_TEXT_LEN'
   26 |                 char text[MAX_TEXT_LEN];
      |                           ^~~~~~~~~~~~
a.cc:10:25: error: size of array 'text' has non-integral type 'double'
   10 | #define MAX_TEXT_LEN    1e+5
      |                         ^~~~
a.cc:26:27: note: in expansion of macro 'MAX_TEXT_LEN'
   26 |                 char text[MAX_TEXT_LEN];
      |                           ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
int main() {
	int n,N;
	std::cin >> n;
	std::vector<char>a(n),b(n);
	for (int i = 0; i < n; i += 1) 
		std::cin >> a[i] >> b[i];
	std::cin >> N;
	std::vector<char>c(N);
	for (int i = 0; i < N; i += 1) {
		std::cin >> c[i];
		for (int j = 0; j < n; j += 1) {
			if (c[i] == a[j])
				c[i] = b[j];
			break;
		}
	}
	for (int i = 0; i < N; i += 1)
		std::cout << c[i];
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: expected '}' at end of input
   21 |         return 0;
      |                  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

int main(){
    int c[256];
    int a;
    while(1){
        scanf("%d",&a);
        if(a==0)return 0;
        for(int i=0;i<256;i++)c[i]=i;
        getchar();
        getchar();
        for(int i=0;i<a;i++){
            char b,d;
            b=getchar();
            getchar();
            d=getchar();
            getchar();
            getchar();
            c[b]=d;
        }
        int e;
        scanf("%d",&e);
        getchar();
        getchar();
        char f;
        for(int i=0;i<e;i++){
            f=getchar();
            getchar();
            getchar();
            putchar(c[(int)f]);
        }
        printf("\n");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
    5 |         scanf("%d",&a);
      |         ^~~~~
a.cc:8:9: error: 'getchar' was not declared in this scope
    8 |         getchar();
      |         ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:28:13: error: 'putchar' was not declared in this scope; did you mean 'char'?
   28 |             putchar(c[(int)f]);
      |             ^~~~~~~
      |             char
a.cc:30:9: error: 'printf' was not declared in this scope
   30 |         printf("\n");
      |         ^~~~~~
a.cc:30:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <map>
using namespace std;
int main(){
    for(;;){
        map<char, char>m;
        int n, i, j;
        char ca, cb;
        scanf("%d", &n);
        if(n==0) break;
        for(i=0; i<n; i++){
            scanf("%c %c", &ca, &cb);
            m[ca] = cb;
        }
        scanf("%d", &j);
        for(i=0; i<j; i++){
            char c;
            scanf("%c", &c);
            auto itr = m.find(c);
            if(itr != m.end()) printf("%c", m[c]);
            else printf("%c", c);
        }
        puts("");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
    8 |         scanf("%d", &n);
      |         ^~~~~
a.cc:19:32: error: 'printf' was not declared in this scope
   19 |             if(itr != m.end()) printf("%c", m[c]);
      |                                ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <map>
  +++ |+#include <cstdio>
    2 | using namespace std;
a.cc:20:18: error: 'printf' was not declared in this scope
   20 |             else printf("%c", c);
      |                  ^~~~~~
a.cc:20:18: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:22:9: error: 'puts' was not declared in this scope
   22 |         puts("");
      |         ^~~~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

using namespace std;

#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define F(i,j,k) fill(i[0],i[0]+j*j,k)
#define P(p) cout<<(p)<<endl;
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define INF 1<<25
#define pb push_back

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;
int main() {
	int n;
	while (scanf("%d", &n), n) {
		char m[128], a, b;
		REP(i, 0, 128) m[i] = i;
		REP(i, 0, n) {
			scanf("%c %c", &a, &b);
			m[a] = b;
		}
		scanf("%d", &n );
        REP(i, 0, n){
            scanf("%c", &a);
            purchar(m[a]);
        }
        puts("");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:13: error: 'purchar' was not declared in this scope; did you mean 'putchar'?
   51 |             purchar(m[a]);
      |             ^~~~~~~
      |             putchar
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

using namespace std;

#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define F(i,j,k) fill(i[0],i[0]+j*j,k)
#define P(p) cout<<(p)<<endl;
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define INF 1<<25
#define pb push_back

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;
int main() {
	int n;
  while(scanf("%d ",&n), n){
    char m[128],a,b;
    REP(i,128) m[i] = i;
    REP(i,n){
      scanf("%c %c ",&a,&b);
      m[a] = b;
    }
    scanf("%d ",&n);
    REP(i,n){
      scanf("%c ",&a);
      putchar(m[a]);
    }
    puts("");
  }
  return 0;
}

Compiler output:
a.cc:43:14: error: macro "REP" requires 3 arguments, but only 2 given
   43 |     REP(i,128) m[i] = i;
      |              ^
a.cc:25:9: note: macro "REP" defined here
   25 | #define REP(i, x, n) for(int i = x; i < n; i++)
      |         ^~~
a.cc:44:12: error: macro "REP" requires 3 arguments, but only 2 given
   44 |     REP(i,n){
      |            ^
a.cc:25:9: note: macro "REP" defined here
   25 | #define REP(i, x, n) for(int i = x; i < n; i++)
      |         ^~~
a.cc:49:12: error: macro "REP" requires 3 arguments, but only 2 given
   49 |     REP(i,n){
      |            ^
a.cc:25:9: note: macro "REP" defined here
   25 | #define REP(i, x, n) for(int i = x; i < n; i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:43:5: error: 'REP' was not declared in this scope
   43 |     REP(i,128) m[i] = i;
      |     ^~~
a.cc:44:8: error: expected ';' before '{' token
   44 |     REP(i,n){
      |        ^    ~
      |        ;
a.cc:49:8: error: expected ';' before '{' token
   49 |     REP(i,n){
      |        ^    ~
      |        ;
Language: C++

def main():
    aaa = {}
    str = ""
    while 1:
        n = int(input())
        if not n:
            break
        for _ in range(n):
            INPUT = input().split()
            aaa[INPUT[0]] = INPUT[1]
        n = int(input())
        if not n:
            break
        for _ in range(n):
            a = input()
            str += aaa[a]if a in aaa else a
        print(str)
        aaa = {}
        str = ""
    return 0
if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
a.cc:3:5: error: 'str' does not name a type
    3 |     str = ""
      |     ^~~
a.cc:19:9: error: 'str' does not name a type
   19 |         str = ""
      |         ^~~
Language: C++

#include<iostream>
#include<map>
using namespace std;
 
int main(){
  while(true){
    int n = 0;
    cin >> n;
    if(n == 0){
      break;
    }
    for(int i = 0; i < n; i++){
      map<char, char> convert;
      char key, value;
      cin >> key; cin >> value;
      map[key] = value;
    }
    int m = 0;
    cin >> m;
    for(int i = 0; i < m; i++){
      char val;
      cin >> val
      if(convert.find(val) == convert.end()){
        cout << convert[val];
      }else{
        cout << val;
      }
    }
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: conflicting declaration 'auto key'
   16 |       map[key] = value;
      |           ^~~
a.cc:14:12: note: previous declaration as 'char key'
   14 |       char key, value;
      |            ^~~
a.cc:22:17: error: expected ';' before 'if'
   22 |       cin >> val
      |                 ^
      |                 ;
   23 |       if(convert.find(val) == convert.end()){
      |       ~~         
a.cc:25:8: error: 'else' without a previous 'if'
   25 |       }else{
      |        ^~~~
Language: C++

#include<iostream>
#include<map>
using namespace std;
  
int main(){
  while(true){
    int n = 0;
    cin >> n;
    if(n == 0){
      break;
    }
    for(int i = 0; i < n; i++){
      map<char, char> convert;
      char key, value;
      cin >> key; cin >> value;
      convert[key] = value;
    }
    int m = 0;
    cin >> m;
    for(int i = 0; i < m; i++){
      char val;
      cin >> val;
      if(convert.find(val) == convert.end()){
        cout << convert[val];
      }else{
        cout << val;
      }
    }
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: 'convert' was not declared in this scope; did you mean 'const'?
   23 |       if(convert.find(val) == convert.end()){
      |          ^~~~~~~
      |          const
Language: C++

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

int main()
{
  int n, m;  //n??????????????????????´???°???m?????????????±??????°
  char temp;

  while(cin >> n, n != 0){
    vector<char> before, after; //???????????????????????¨?????????????????????
    for(int i=0; i<n; ++i){
      cin >> temp;
      before.push_back(temp);
      cin >> temp;
      after.push_back(temp);
    }
    cin >> m;
    for(int i=0; i<m; ++i){
      cin >> temp;
      if(find(befor.begin(), before.end(), temp) == before.end()){ //???????????????
	cout << temp;  //????????????
      }
      else{
	cout << after[find(before.begin(), before.end(), temp)];
      }
    }
    cout << "\n";  //??????
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'befor' was not declared in this scope; did you mean 'before'?
   21 |       if(find(befor.begin(), before.end(), temp) == before.end()){ //???????????????
      |               ^~~~~
      |               before
a.cc:25:27: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, char&)'
   25 |         cout << after[find(before.begin(), before.end(), temp)];
      |                       ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:25:27: note:   '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   25 |         cout << after[find(before.begin(), before.end(), temp)];
      |                       ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
  int n, m;  //n??????????????????????´???°???m?????????????±??????°
  char temp;

  while(cin >> n, n != 0){
    vector<char> before, after; //???????????????????????¨?????????????????????
    for(int i=0; i<n; ++i){
      cin >> temp;
      before.push_back(temp);
      cin >> temp;
      after.push_back(temp);
    }
    cin >> m;
    for(int i=0; i<m; ++i){
      cin >> temp;
      if(find(before.begin(), before.end(), temp) == before.end()){ //???????????????
	cout << temp;  //????????????
      }
      else{
	cout << after[find(before.begin(), before.end(), temp)];
      }
    }
    cout << "\n";  //??????
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: no match for 'operator[]' (operand types are 'std::vector<char>' and '__gnu_cxx::__normal_iterator<char*, std::vector<char> >')
   26 |         cout << after[find(before.begin(), before.end(), temp)];
      |                      ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = char; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1128:28: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' to 'std::vector<char>::size_type' {aka 'long unsigned int'}
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1147:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = char; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1147:28: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' to 'std::vector<char>::size_type' {aka 'long unsigned int'}
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
  int n, m;  //n??????????????????????´???°???m?????????????±??????°
  char temp;

  while(cin >> n, n != 0){
    vector<char> before, after; //???????????????????????¨?????????????????????
    for(int i=0; i<n; ++i){
      cin >> temp;
      before.push_back(temp);
      cin >> temp;
      after.push_back(temp);
    }
    cin >> m;
    for(int i=0; i<m; ++i){
      cin >> temp;
      if(find(before.begin(), before.end(), temp) == before.end()){ //???????????????
	cout << temp;  //????????????
      }
      else{
	int outi = find(before.befin(), before.end(), temp);
	cout << after[outi];
      }
    }
    cout << "\n";  //??????
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:32: error: 'class std::vector<char>' has no member named 'befin'; did you mean 'begin'?
   26 |         int outi = find(before.befin(), before.end(), temp);
      |                                ^~~~~
      |                                begin
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
  int n, m;  //n??????????????????????´???°???m?????????????±??????°
  char temp;

  while(cin >> n, n != 0){
    vector<char> before, after; //???????????????????????¨?????????????????????
    for(int i=0; i<n; ++i){
      cin >> temp;
      before.push_back(temp);
      cin >> temp;
      after.push_back(temp);
    }
    cin >> m;
    for(int i=0; i<m; ++i){
      cin >> temp;
      if(find(before.begin(), before.end(), temp) == before.end()){ //???????????????
	cout << temp;  //????????????
      }
      else{
	int outi = find(before.begin(), before.end(), temp);
	cout << after[outi];
      }
    }
    cout << "\n";  //??????
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: cannot convert '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' to 'int' in initialization
   26 |         int outi = find(before.begin(), before.end(), temp);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        |
      |                        __gnu_cxx::__normal_iterator<char*, std::vector<char> >
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
  int n, m;  //n??????????????????????´???°???m?????????????±??????°
  char temp;

  while(cin >> n, n != 0){
    vector<char> before, after; //???????????????????????¨?????????????????????
    for(int i=0; i<n; ++i){
      cin >> temp;
      before.push_back(temp);
      cin >> temp;
      after.push_back(temp);
    }
    cin >> m;
    for(int i=0; i<m; ++i){
      cin >> temp;
      if(find(before.begin(), before.end(), temp) == before.end()){ //???????????????
	cout << temp;  //????????????
      }
      else{
	int outi = (int)find(before.begin(), before.end(), temp);
	cout << after[outi];
      }
    }
    cout << "\n";  //??????
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:20: error: invalid cast from type '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' to type 'int'
   26 |         int outi = (int)find(before.begin(), before.end(), temp);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
int dfs(int n, int max, int s) {

Compiler output:
a.cc: In function 'int dfs(int, int, int)':
a.cc:15:33: error: expected '}' at end of input
   15 | int dfs(int n, int max, int s) {
      |                                ~^
a.cc:15:33: warning: no return statement in function returning non-void [-Wreturn-type]
Language: C++

int main(){

  map<char,char> a2b;

  char a,b,c;

  int n;

  for( ; ; ){

  cin>> n;

  if(n==0)break;

   for(int i=0;i<n;i++){

     cin>>a>>b;

     a2b[a]=b;

   }
   cin>>n;
   for(int i=0;i<n;i++){
     cin>>c;
     if(a2b.count(c)==0)
       cout<<c;
     else cout<<a2b[c];
   }
   cout<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'map' was not declared in this scope
    3 |   map<char,char> a2b;
      |   ^~~
a.cc:3:7: error: expected primary-expression before 'char'
    3 |   map<char,char> a2b;
      |       ^~~~
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin>> n;
      |   ^~~
a.cc:19:6: error: 'a2b' was not declared in this scope
   19 |      a2b[a]=b;
      |      ^~~
a.cc:25:9: error: 'a2b' was not declared in this scope
   25 |      if(a2b.count(c)==0)
      |         ^~~
a.cc:26:8: error: 'cout' was not declared in this scope
   26 |        cout<<c;
      |        ^~~~
a.cc:27:11: error: 'cout' was not declared in this scope
   27 |      else cout<<a2b[c];
      |           ^~~~
a.cc:29:4: error: 'cout' was not declared in this scope
   29 |    cout<<endl;
      |    ^~~~
a.cc:29:10: error: 'endl' was not declared in this scope
   29 |    cout<<endl;
      |          ^~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<map>
using namespace std ;
int main(){
  map<char,char> a2b;
  int n,;
  char a,b; 
  for(;;){
    cin>>n;
    if(n==0)break;
    for(int i=0;i<n;i++){
      cin >> a >> b;
      a2b[a]=b;
	}
    cin>>n;
    for(int i=0;i<n;i++){
      cin>>a;
      if(a2b.count(a)==0){
	cout<<a;
      }
      else cout<<a2b[a];
      }
    cout<<endl;
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before ';' token
    7 |   int n,;
      |         ^
Language: C++

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

public class Main {
	public static void main(String[] args) throws IOException {
		String 	strCount = "";
		int 	cmd = 0;
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

		while((cmd = Integer.parseInt(bufferedReader.readLine())) != 0) {

			strCount = String.valueOf(cmd);
			ArrayList<String[]> alConvertCharAt = new ArrayList<String[]>();
			ArrayList<Boolean> alConvertFlg = new ArrayList<Boolean>();
			//Count
			for(int i = 0; i < Integer.parseInt(strCount); i++) {
				alConvertCharAt.add(bufferedReader.readLine().split(" "));
				alConvertFlg.add(true);
			}

			strCount = bufferedReader.readLine();
			StringBuffer strBuffConverted = new StringBuffer(Integer.parseInt(strCount));

			for(int i = 0; i < Integer.parseInt(strCount); i++) {
				String befConvCharAt = bufferedReader.readLine();

				int arrConvCharAtCounter = 0;
				boolean isNoConvert = true;

				for(String[] arrConvChart: alConvertCharAt) {
					if(arrConvChart[0].equals(befConvCharAt)){
						if(alConvertFlg.get(arrConvCharAtCounter)) {
							strBuffConverted.append(arrConvChart[1]);
							alConvertFlg.set(arrConvCharAtCounter, false);
						} else {
							strBuffConverted.append(arrConvChart[0]);
						}

						isNoConvert = false;
						break;
					}
				}

				if(isNoConvert) strBuffConverted.append(alConvertCharAt.get(i)[0]);
			}

			System.out.println(strBuffConverted.toString());
		}
	}
}

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:4:1: error: 'import' does not name a type
    4 | import java.util.ArrayList;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <valarray>
#include <algorithm>
#include <time.h>
#include <cstdlib>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main (void)
{
	long m,n;
	long char a[100],b[100],c[100];

	for (int i = 0; i < 100; i++)
	{
		cin >> n;

		if (n == 0)
				{
					break;
				}

		if (n == 'T')
		{
			cout << "Too" << " " << "Large";
			break;
		}

		for (int j = 0; j < n; j++)
		{
			cin >> a[j] >> b[j];
		}

		cin >> m;


		 for (int k = 0; k < m; k++)
		 {
			 cin >> c[k];
			for (int j = 0; j < n; j++)
			{
			 if (c[k] == a[j])
			 {
			 	c[k] = b[j];
			 }
			 else
		     {
			 }
		   }

			cout << c[k];

		 }

		 cout << endl;

	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'long' specified with 'char'
   21 |         long char a[100],b[100],c[100];
      |         ^~~~
a.cc:21:9: error: 'long' specified with 'char'
a.cc:21:9: error: 'long' specified with 'char'
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <valarray>
#include <algorithm>
#include <time.h>
#include <cstdlib>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main (void)
{
	long m,n;
	long char a[100],b[100],c[100];

	for (int i = 0; i < 100; i++)
	{
		cin >> n;

		if (n == 0)
				{
					break;
				}


		for (int j = 0; j < n; j++)
		{
			cin >> a[j] >> b[j];
		}

		cin >> m;


		 for (int k = 0; k < m; k++)
		 {
			 cin >> c[k];
			for (int j = 0; j < n; j++)
			{
			 if (c[k] == a[j])
			 {
			 	c[k] = b[j];
			 }
			 else
		     {
			 }
		   }

			cout << c[k];

		 }

		 cout << endl;

	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'long' specified with 'char'
   21 |         long char a[100],b[100],c[100];
      |         ^~~~
a.cc:21:9: error: 'long' specified with 'char'
a.cc:21:9: error: 'long' specified with 'char'
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <valarray>
#include <algorithm>
#include <time.h>
#include <cstdlib>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main (void)
{
	long m,n;
	long char a[100000],b[100000],c[100000];

	for (int i = 0; i < 100; i++)
	{
		cin >> n;

		if (n == 0)
				{
					break;
				}


		for (int j = 0; j < n; j++)
		{
			cin >> a[j] >> b[j];
		}

		cin >> m;


		 for (int k = 0; k < m; k++)
		 {
			 cin >> c[k];
			for (int j = 0; j < n; j++)
			{
			 if (c[k] == a[j])
			 {
			 	c[k] = b[j];
			 }
			 else
		     {
			 }
		   }

			cout << c[k];

		 }

		 cout << endl;

	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'long' specified with 'char'
   21 |         long char a[100000],b[100000],c[100000];
      |         ^~~~
a.cc:21:9: error: 'long' specified with 'char'
a.cc:21:9: error: 'long' specified with 'char'