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

#include <iostream>
#include <string>
#include <map>
#define rep(i, n) for(int i ; i<n; ++i)
using namespace std;
int main(){
    map<char, string> player;
    for(char ch='A'; ch<='C'; ch++){
        string s;
        cin>>s;
        player[ch] = s;
    }
    while(1){
        int i = 1, j = 0, k = 0;
        char tern = player['A'][0];
        if(tern == 'a'){
            tern = player['A'][i];
            if((player['A'].size - i )==1){
                cout<<'A'<<endl;
                break;
            }
            i++;
        }
        else if(tern == 'b'){
            tern = player['B'][j];
            if((player['B'].size - j) == 1){
                cout<<'B'<<endl;
                break;
            }
            j++;
        }
        else if(tern == 'c'){
            tern = player['C'][k];
            if((player['C'].size - k) == 1){
                cout<<'C'<<endl;
                break;
            }
            k++;
        }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   18 |             if((player['A'].size - i )==1){
      |                                 ()
a.cc:26:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |             if((player['B'].size - j) == 1){
      |                                 ()
a.cc:34:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   34 |             if((player['C'].size - k) == 1){
      |                                 ()
Language: C++

#include <iostream>
#include <string>
#include <map>
#define rep(i, n) for(int i ; i<n; ++i)
using namespace std;
int main(){
    map<char, string> player;
    for(char ch='A'; ch<='C'; ch++){
        string s;
        cin>>s;
        player[ch] = s;
    }
    while(1){
        int i = 1, j = 0, k = 0;
        char tern = player['A'][0];
        if(tern == 'a'){
            tern = player['A'][i];
            if(player['A'].size - i ==1){
                cout<<'A'<<endl;
                break;
            }
            i++;
        }
        else if(tern == 'b'){
            tern = player['B'][j];
            if(player['B'].size - j == 1){
                cout<<'B'<<endl;
                break;
            }
            j++;
        }
        else if(tern == 'c'){
            tern = player['C'][k];
            if(player['C'].size - k == 1){
                cout<<'C'<<endl;
                break;
            }
            k++;
        }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:28: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   18 |             if(player['A'].size - i ==1){
      |                                ()
a.cc:26:28: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |             if(player['B'].size - j == 1){
      |                                ()
a.cc:34:28: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   34 |             if(player['C'].size - k == 1){
      |                                ()
Language: C++

#include <iostream>
#include <string>
#define rep(i, n) for(int i ; i<n; ++i)
using namespace std;
int main(){
    map<char, string> players;
    for(char ch='A'; ch<='C'; ch++){
        string s;
        cin>>s;
        player[ch] = s;
    }
    while(1){
        int i = 1, j = 0, k = 0;
        char tern = player['A'][0];
        if(tern == 'a'){
            tern = player['A'][i];
            if(player['A'].size - i ==1){
                cout<<'A'<<endl;
                break;
            }
            i++;
        }
        else if(tern == 'b'){
            tern = player['B'][j];
            if(player['B'].size - j == 1){
                cout<<'B'<<endl;
                break;
            }
            j++;
        }
        else if(tern == 'c'){
            tern = player['C'][k];
            if(player['C'].size - k == 1){
                cout<<'C'<<endl;
                break;
            }
            k++;
        }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'map' was not declared in this scope
    6 |     map<char, string> players;
      |     ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | #include <string>
a.cc:6:9: error: expected primary-expression before 'char'
    6 |     map<char, string> players;
      |         ^~~~
a.cc:10:9: error: 'player' was not declared in this scope
   10 |         player[ch] = s;
      |         ^~~~~~
a.cc:14:21: error: 'player' was not declared in this scope
   14 |         char tern = player['A'][0];
      |                     ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;

int main() {
    string Sa, Sb, Sc;
    cin >> Sa >> Sb >> Sc;
    vector<string> Ss = {Sa, Sb, Sc};
    vector<vector<char>> S = {{}, {}, {}};
    for (int i = 0; i < 2; i++){
        for (int j = Ss[i].length() - 1; j >= 0; j--){
            S[i].push_back(Ss[i][j]);
        }
    }
    vector<char> c = {'a', 'b', 'c'};
    int tmp = 0;
    char x;
    while (S[tmp].length() > 0){
        x = S[tmp][S[tmp].length() - 1];
        S[tmp].pop_back();
        if (x == 'a'){
            tmp = 0;
        }
        else if (x == 'b') {
            tmp = 1;
        }
        else {
            tmp = 2;
        }
    }
    cout << c[tmp] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
   20 |     while (S[tmp].length() > 0){
      |                   ^~~~~~
a.cc:21:27: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
   21 |         x = S[tmp][S[tmp].length() - 1];
      |                           ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;

int main() {
    string Sa, Sb, Sc;
    cin >> Sa >> Sb >> Sc;
    vector<string> Ss = {Sa, Sb, Sc};
    vector<vector<char>> S = {{}, {}, {}};
    for (int i = 0; i < 2; i++){
        for (int j = Ss[i].length() - 1; j >= 0; j--){
            S[i].push_back(Ss[i][j]);
        }
    }
    vector<char> c = {'a', 'b', 'c'};
    int tmp = 0;
    char x;
    while (S[tmp].length() > 0){
        x = S[tmp].pop_back();
        if (x == 'a'){
            tmp = 0;
        }
        else if (x == 'b') {
            tmp = 1;
        }
        else {
            tmp = 2;
        }
    }
    cout << c[tmp] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
   20 |     while (S[tmp].length() > 0){
      |                   ^~~~~~
a.cc:21:28: error: void value not ignored as it ought to be
   21 |         x = S[tmp].pop_back();
      |             ~~~~~~~~~~~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;

int main() {
    string Sa, Sb, Sc;
    cin >> Sa >> Sb >> Sc;
    vector<string> Ss = {Sa, Sb, Sc};
    vector<vector<char>> S = {{}, {}, {}};
    for (int i = 0; i < 2; i++){
        for (int j = Ss[i].length() - 1; j >= 0; j--){
            S[i].push_back(Ss[i][j]);
        }
    }
    vector<char> c = {'a', 'b', 'c'};
    int tmp = 0;
    char x;
    while (S[tmp].length() > 0){
        x = S[tmp].pop_back()
        if (x == 'a'){
            tmp = 0;
        }
        else if (x == 'b') {
            tmp = 1;
        }
        else {
            tmp = 2;
        }
    }
    cout << c[tmp] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
   20 |     while (S[tmp].length() > 0){
      |                   ^~~~~~
a.cc:21:28: error: void value not ignored as it ought to be
   21 |         x = S[tmp].pop_back()
      |             ~~~~~~~~~~~~~~~^~
a.cc:25:9: error: 'else' without a previous 'if'
   25 |         else if (x == 'b') {
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;

int main() {
    string Sa, Sb, Sc;
    cin >> Sa >> Sb >> Sc;
    vector<string> Ss = {Sa, Sb, Sc};
    vector<vector<char>> S (3);
    for (int i = 0; i < 2; i++){
        for (int j = Ss[i].length() - 1; j >= 0; j--){
            S[i].push_back(Ss[i][j]);
        }
    }
    vector<char> c = {'a', 'b', 'c'};
    int tmp = 0;
    char x;
    while (S[tmp].length() > 0){
        x = S[tmp].pop_back()
        if (x == 'a'){
            tmp = 0;
        }
        else if (x == 'b') {
            tmp = 1;
        }
        else {
            tmp = 2;
        }
    }
    cout << tmp << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'class std::vector<char>'} has no member named 'length'
   20 |     while (S[tmp].length() > 0){
      |                   ^~~~~~
a.cc:21:28: error: void value not ignored as it ought to be
   21 |         x = S[tmp].pop_back()
      |             ~~~~~~~~~~~~~~~^~
a.cc:25:9: error: 'else' without a previous 'if'
   25 |         else if (x == 'b') {
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string A,B,C;
  cin >> A >> B >> C;
  char T = 'a';
  while (A.size()>0 && B.size()>0 && C.size()>0){
    if (T = 'a'){
      T = A[0];
      A = substr(1,A.size()-1);
    }
    if (T = 'b'){
      T = B[0];
      B = substr(1,B.size()-1);
    }
    if (T = 'c'){
      T = C[0];
      C = substr(1,C.size()-1);
    }
  }
  if (A.size()==0){
    cout << 'A';
  }
  if (B.size()==0){
    cout << 'B';
  }
  if (C.size()==0){
    cout << 'C';
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   10 |       A = substr(1,A.size()-1);
      |           ^~~~~~
      |           strstr
a.cc:14:11: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   14 |       B = substr(1,B.size()-1);
      |           ^~~~~~
      |           strstr
a.cc:18:11: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   18 |       C = substr(1,C.size()-1);
      |           ^~~~~~
      |           strstr
Language: C++

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

int main() {
  string s_a, s_b, s_c;
  cin >> s_a >> s_b >> s_c;
  
  string next_card == 'a';
  bool b = ture;
  while (b) {
    if (next_card == 'a'){
      next_card = s_a.at(0);
      s_a.erase(s_a.begin());
      if(s_a.empty() == true) {
        cout << "A" << endl;
        break;
      }
    }else if (next_card == 'b'){
      next_card = s_b.at(0);
      s_b.erase(s_b.begin());
      if(s_b.empty() == true) {
        cout << "B" << endl;
        break;
      }      
    }else{
      next_card = s_c.at(0);
      s_c.erase(s_c.begin());
      if(s_c.empty() == true) {
        cout << "C" << endl;
        break;
      }      
    }
  } 
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected initializer before '==' token
    8 |   string next_card == 'a';
      |                    ^~
a.cc:9:12: error: 'ture' was not declared in this scope
    9 |   bool b = ture;
      |            ^~~~
a.cc:11:9: error: 'next_card' was not declared in this scope; did you mean 'nexttoward'?
   11 |     if (next_card == 'a'){
      |         ^~~~~~~~~
      |         nexttoward
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define ALL(x) (x).begin(),(x).end()
const long long MOD = 1000000007;
const long long INF = 1LL << 60;

int main(){
	string A1, B1, C1;
	cin >> A1 >> B1 >> C1;
	queue<char> A;
	queue<char> B;
	queue<char> C;
	for(int i = 0; i < A1.length(); i++)A.push(A1[i]);
	for(int i = 0; i < B1.length(); i++)B.push(B1[i]);
	for(int i = 0; i < C1.length(); i++)C.push(C1[i]);
	bool AA = true, BB = false, CC = false;
	
	while(true){
		if(AA){
			if(A.empty()){
				cout << 'A' << endl;
				return 0;
			}
			
			char S = A.front();
			A.pop()
			if(S == 'a'){
				continue;
			}else if(S == 'b'){
				AA = false;
				BB = true;
			}else if(S == 'c'){
				AA = false;
				CC = true;
			}
		}
		
		else if(BB){
			if(B.empty()){
				cout << 'B' << endl;
				return 0;
			}
			
			char S = B.front();
			B.pop();
			if(S == 'a'){
				AA = true;
				BB = false;
			}else if(S == 'b'){
				continue;
			}else if(S == 'c'){
				BB = false;
				CC = true;
			}
		}
		
		else if(CC){
			if(C.empty()){
				cout << 'C' << endl;
				return 0;
			}
			
			char S = C.front();
			C.pop();
			if(S == 'a'){
				AA = true;
				CC = false;
			}else if(S == 'b'){
				BB = true;
				CC = false;
			}else if(S == 'c'){
				continue;
			}
		}/*else{
			cout << "ALL_FALSE" << endl;
			return 0;
		}*/
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:32: error: expected ';' before 'if'
   29 |                         A.pop()
      |                                ^
      |                                ;
   30 |                         if(S == 'a'){
      |                         ~~      
a.cc:32:26: error: expected '}' before 'else'
   32 |                         }else if(S == 'b'){
      |                          ^~~~
a.cc:22:23: note: to match this '{'
   22 |                 if(AA){
      |                       ^
a.cc:32:34: error: 'S' was not declared in this scope
   32 |                         }else if(S == 'b'){
      |                                  ^
a.cc:41:17: error: 'else' without a previous 'if'
   41 |                 else if(BB){
      |                 ^~~~
a.cc:53:33: error: continue statement not within a loop
   53 |                                 continue;
      |                                 ^~~~~~~~
a.cc:75:33: error: continue statement not within a loop
   75 |                                 continue;
      |                                 ^~~~~~~~
a.cc: At global scope:
a.cc:82:1: error: expected declaration before '}' token
   82 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define repeat(i,a,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
  vector<string> S(3);
  repeat(i,0,3) cin >>S[i];
  
  int i = 0;
  char ans;
  while(true){
    if (s[i].size()==0){
      ans = 'A'+i;
      break;
    }
    char front = s[i][0];
    s[i].erase(0,1);
    i = front - 'a';
  }

  cout <<ans<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 's' was not declared in this scope
   12 |     if (s[i].size()==0){
      |         ^
a.cc:16:18: error: 's' was not declared in this scope
   16 |     char front = s[i][0];
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    string s[3];
    cin >>s[0]>>s[1]>>s[2];
    int i=0;
    while(true){
      if(s[i].size()==0){
        cout<<char('A'+i)<<endl;
      }
      char c=s[i].substr(0,1);
      s[i].erase(0,0);
      i=c-'a';
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in initialization
   12 |       char c=s[i].substr(0,1);
      |              ~~~~~~~~~~~^~~~~
      |                         |
      |                         std::__cxx11::basic_string<char>
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s[3];
  cin>>s[0]>>s[1]>>s[2];
  int turn=0;
  char ans;
  while(1){
    if(s[turn].empty()){
      ans=turn+'A';
      break;
    }
    int tmp=s[turn][0]-'a'
    s[turn].erase(s[turn].begin());
    turn=tmp;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: expected ',' or ';' before 's'
   14 |     s[turn].erase(s[turn].begin());
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  string a,b,c;
  cin>>a>>b>>c;
  int x=0;
  int y,z=0;
  char next=a;
  while(1){
    if(a[x]=='a'&&next=='a'){
      x++;
      next='a';
    }
    else if(a[x]=='b'&&next=='a'){
      x++;
      next='b';
    }
    else if(a[x]=='c'&&next=='a'){
      x++;
      next='c';
    }
    else if(b[y]=='a'&&next=='b'){
      next='a';
      y++;
    }
    else if(b[y]=='b'&&next=='b'){
      y++;
      next='b';
    }
    else if(b[y]=='c'&&next=='c'){
      y++;
      next='c';
    }
    else if(c[z]=='a'&&next=='c'){
      z++;
      next='a';
    }
    else if(c[z]=='b'&&next=='c'){
      z++;
      next='b';
    }
    else if(c[z]=='c'&&next=='c'){
      z++;
      next='c';
    }
    if(a.size()<x){
      cout<<"A"<<endl;
      return 0;
    }
    else if(b.size()<y){
      cout<<"B"<<endl;
      return 0;
    }
    else{
      cout<<'C'<<endl;
      return 0;
    }
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
   18 |   char next=a;
      |             ^
      |             |
      |             std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  string a,b,c;
  cin>>a>>b>>c;
  int x=0;
  int y,z=-1;
  char next;
  while(1){
    if(a[x]=='a'&&next=='a'){
      x++;
      next='a';
    }
    else if(a[x]=='b'&&next=='a'){
      x++;
      next='b';
    }
    else if(a[x]=='c'&&next=='a'){
      x++;
      next='c';
    }
    else if(b[y]=='a'&&next=='b'){
      next='a';
      y++;
    }
    else if(b[y]=='b'&&next=='b'){
      y++;
      next='b';
    }
    else if(b[y]=='c'&&next=='c'){
      y++;
      next='c';
    }
    else if(c[z]=='a'&&next=='c'){
      z++;
      next='a';
    }
    else if(c[z]=='b'&&next=='c'){
      z++;
      next='b';
    }
    else if(c[z]=='c'&&next=='c'){
      z++;
      next='c';
    }
    if(a.size()<x){
      cout<<"a"<<endl;
      return 0;
    }
    else if(b.size()<y){
      cout<<"b"<<endl;
      return 0;
    }
    else{
      cout<<'c'<<endl;
      return 0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:68:2: error: expected '}' at end of input
   68 | }
      |  ^
a.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^
Language: C

#include <stdio.h>int main(){char a[99],b[99],c[99];char t,x;int g=0,h=0,q=0,end =1;scanf("%s%s%s",a,b,c);t = a[g];while(end){switch (t){case('a'): g++;t = a[g];x = 'A';break;case('b'): t= b[h];h++;x ='B';break;case('c'):t= c[q]; q++;x='C'; break;default: printf("%c",x); end =0;}}return 0;}

Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>int main(){char a[99],b[99],c[99];char t,x;int g=0,h=0,q=0,end =1;scanf("%s%s%s",a,b,c);t = a[g];while(end){switch (t){case('a'): g++;t = a[g];x = 'A';break;case('b'): t= b[h];h++;x ='B';break;case('c'):t= c[q]; q++;x='C'; break;default: printf("%c",x); end =0;}}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 <stdio.h>
int main(){
char a[100],b[100],c[100];
char t,x;
int g=0,h=0,q=0;
int end =1;
scanf("%s%s%s",a,b,c);
t = a[g];
while(end){
switch (t){
case('a'):
  aa++;
  t = a[g];
  x = 'A';
  break;
case('b'):
  t= b[h];
  bb++;
  x = 'B';
  break;
case('c'):
  t= c[q];
  cc++;
  x='C';
  break;
default:
  printf("%c",x);
  end =0;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:3: error: 'aa' undeclared (first use in this function); did you mean 'a'?
   12 |   aa++;
      |   ^~
      |   a
main.c:12:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:3: error: 'bb' undeclared (first use in this function); did you mean 'b'?
   18 |   bb++;
      |   ^~
      |   b
main.c:23:3: error: 'cc' undeclared (first use in this function); did you mean 'c'?
   23 |   cc++;
      |   ^~
      |   c
Language: C++

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

int main() {
  vector<string> s(3);
  cin>>s.at(0)>>s.at(1)>>s.at(2);
  int n=0;
  
  while(true){
    
    if(s.at(n).empty()){
      if(n==0)cout<<'A'<<endl;
      else if(n==1)cout<<'B'<<endl;
      else if(n==2)cout<<'C'<<endl;
      break;
    }
    
    if(s.at(n).at(0)=='a'){
      n=0;
      s.at(n).erase(s.at(n).begin());
    }else if(s.at(n).at(0)=='b'){
      n=1;
      s.at(n).erase(s.at(n).begin());
    }else if(s.at(n).at(0)=='c'){
      n=2;
      s.at(n).erase(s.at(n).begin());
    }
    
    
  }
  
}
c

Compiler output:
a.cc:33:1: error: 'c' does not name a type
   33 | c
      | ^
Language: C

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

char s[3][101]; int n[3], c[3];
int r(int i){
  if(c[i] == n[i]) return i;
  return dfs(s[i][c[i]++] - 'a');
}

int
main()
{
  for(int i = 0; i < 3; i++){
    scanf("%s", s[i]);
    n[i] = strlen(s[i]);
  }

  printf("%c\n", r(0) + 'A');

  return 0;
}
  


Compiler output:
main.c: In function 'r':
main.c:7:10: error: implicit declaration of function 'dfs'; did you mean 'ffs'? [-Wimplicit-function-declaration]
    7 |   return dfs(s[i][c[i]++] - 'a');
      |          ^~~
      |          ffs
Language: C

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

char s[3][101]; int n[3], c[3];
int r(int i){
  if(c[i] == n[i]) return i;
  return dfs(s[i][c[i]++] - 'a');
}

int
main()
{
  for(int i = 0; i < 3; i++){
    scanf("%s", s[i]);
    n[i] = strlen(s[i]);
  }

  printf("%c\n", dfs(0) + 'A');

  return 0;
}
  


Compiler output:
main.c: In function 'r':
main.c:7:10: error: implicit declaration of function 'dfs'; did you mean 'ffs'? [-Wimplicit-function-declaration]
    7 |   return dfs(s[i][c[i]++] - 'a');
      |          ^~~
      |          ffs
Language: C++

a = [0] * 3
a[0] = input()[::-1]
a[1] = input()[::-1]
a[2] = input()[::-1]

d = dict()

d['a'] = 0
d['b'] = 1
d['c'] = 2

nxt = 0
cur = 0

while True:
  cur = nxt
  if len(a[cur])  == 0:
    break
  nxt = d[a[cur][-1]]
  a[cur] = a[cur][:-1]
if cur == 0:
  print('A')
elif cur == 1:
  print('B')
else:
  print('C')

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = [0] * 3
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string A,B,C; int countA=1;int countB,countC=0; char win;
  cin>>A>>B>>C;
  char ch=A.at(0);
 Outer:
  for(int i=0;i<300;i++){
  Inner:  switch(ch){
      case 'a': countA++;
                ch=A.at(i);
                if(countA=A.size()){
                  win='A';
                  break Outer;
                } 
                  break;
      case 'b': countB++;
                ch=B.at(i);
                if(countB=B.size()){
                  win='B';
                  break Outer;
                }
                break;
      case 'c': countC++;
                ch=C.at(i);
                if(countC=C.size()){
                  win='C';
                  break Outer;
                }
                break;
     }
  }
  cout<<win<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before 'Outer'
   14 |                   break Outer;
      |                        ^~~~~~
      |                        ;
a.cc:14:25: error: 'Outer' was not declared in this scope
   14 |                   break Outer;
      |                         ^~~~~
a.cc:21:24: error: expected ';' before 'Outer'
   21 |                   break Outer;
      |                        ^~~~~~
      |                        ;
a.cc:21:25: error: 'Outer' was not declared in this scope
   21 |                   break Outer;
      |                         ^~~~~
a.cc:28:24: error: expected ';' before 'Outer'
   28 |                   break Outer;
      |                        ^~~~~~
      |                        ;
a.cc:28:25: error: 'Outer' was not declared in this scope
   28 |                   break Outer;
      |                         ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string A,B,C; int countA=1;int countB,countC=0; char win;
  cin>>A>>B>>C;
  char ch=A.at(0);
 Outer:
  for(int i=0;i<300;i++){
    switch(ch){
      case 'a': countA++;
                ch=A.at(i);
                if(countA=A.size()){
                  win='A';
                  break Outer;
                } 
                  break;
      case 'b': countB++;
                ch=B.at(i);
                if(countB=B.size()){
                  win='B';
                  break Outer;
                }
                break;
      case 'c': countC++;
                ch=C.at(i);
                if(countC=C.size()){
                  win='C';
                  break Outer;
                }
                break;
     }
  }
  cout<<win<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before 'Outer'
   14 |                   break Outer;
      |                        ^~~~~~
      |                        ;
a.cc:14:25: error: 'Outer' was not declared in this scope
   14 |                   break Outer;
      |                         ^~~~~
a.cc:21:24: error: expected ';' before 'Outer'
   21 |                   break Outer;
      |                        ^~~~~~
      |                        ;
a.cc:21:25: error: 'Outer' was not declared in this scope
   21 |                   break Outer;
      |                         ^~~~~
a.cc:28:24: error: expected ';' before 'Outer'
   28 |                   break Outer;
      |                        ^~~~~~
      |                        ;
a.cc:28:25: error: 'Outer' was not declared in this scope
   28 |                   break Outer;
      |                         ^~~~~
Language: C++

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

int main(){
  string sa,sb,sc;
  cin >> sa >> sb >> sc;
  reverse(sa.begin(),sa.end());
  reverse(sb.begin(),sb.end());
  reverse(sc.begin(),sc.end());
  char next='a';
  while(!(sa.length()==0 || sb.length()==0 sc.length()==0)){
    if(next=='a'){
      next=sa[sa.length()-1];
      sa.pop_back();
    }
    if(next=='b'){
      next=sb[sb.length()-1];
      sb.pop_back();
    }
    if(next=='c'){
      next=sc[sc.length()-1];
      sc.pop_back();
    }
  }
  if(sa.length()==0)cout << 'A' << endl;
  if(sb.length()==0)cout << 'B' << endl;
  if(sc.length()==0)cout << 'C' << endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:11:43: error: expected ')' before 'sc'
   11 |   while(!(sa.length()==0 || sb.length()==0 sc.length()==0)){
      |          ~                                ^~~
      |                                           )
a.cc:24:4: error: expected ')' before 'if'
   24 |   }
      |    ^
      |    )
   25 |   if(sa.length()==0)cout << 'A' << endl;
      |   ~~
a.cc:11:8: note: to match this '('
   11 |   while(!(sa.length()==0 || sb.length()==0 sc.length()==0)){
      |        ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

int main() {
    string SA, SB, SC;
    cin >> SA >> SB >> SC;
    int SAL = SA.size();
    int SBL = SB.size();
    int SCL = SC.size();
    int x = 0;  y = 0;  z = 0;
    int winA = 0; winB = 0; winC = 0;
    char next = 'a';

    while(1) {
        if(next == 'a') {
            x++;
            if(SAL < x) {
                winA = 1;
                break;
            }
            next = SA[x-1];
        }
        else if(next == 'b') {
            y++;
            if(SBL < y) {
                winB = 1;
                break;
            }
            next = SB[y-1];
        }
        else if(next == 'c') {
            z++;
            if(SCL < z) {
                winC = 1;
                break;
            }
            next = SC[z-1];
        }
    }

    if(winA == 1) {
        cout << 'A';
    }
    else if(winB == 1) {
        cout << 'B';
    }
    else if(winC == 1) {
        cout << 'C';
    }
    
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'y' was not declared in this scope
   17 |     int x = 0;  y = 0;  z = 0;
      |                 ^
a.cc:17:25: error: 'z' was not declared in this scope
   17 |     int x = 0;  y = 0;  z = 0;
      |                         ^
a.cc:18:19: error: 'winB' was not declared in this scope; did you mean 'winA'?
   18 |     int winA = 0; winB = 0; winC = 0;
      |                   ^~~~
      |                   winA
a.cc:18:29: error: 'winC' was not declared in this scope; did you mean 'winA'?
   18 |     int winA = 0; winB = 0; winC = 0;
      |                             ^~~~
      |                             winA
Language: C++

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

//vector…可変長、データの大きさに合わせてサイズを変える
//list…双方向リスト、要素を挿入、削除の多いとき
//forward_list
//array…固定長配列
//set…集合
//multiset
//bitset…2進数、固定長ビット列
//map…連想配列、キーと値を関連付ける
//multimap
//deque
//stack…FILO
//queue…FIFO
//priority_queue…格納された最大値から順に取り出す
//pair…二つの値を一組
//tuple…複数の値を一組

template<typename T>
void remove(std::vector<T>& vector, char index) {
    vector.erase(vector.begin() + index);
}

template<class T>
T ma(std::vector<T> &v) {
    T maxi = 0;
    for(auto &i:v) maxi = max(maxi, i);
    return maxi;
}

template<class T>
T mi(std::vector<T> &v) {
    T mini = 0;
    for(auto &i:v) mini = min(mini, i);
    return mini;
}

template <class T>
T pow(T x, T y, T n = numeric_limits<T>::max()) {
    if(y == 0) return 1;
    if(y % 2 == 0) return pow((x * x) % n, y / 2);
    return (x * pow(x, y - 1)) % n;
}

#define rep(i, n, m) for (int i = n; i <= m; i++)
#define Rep(i, n, m) for (int i = m; i >= 1; i--)

typedef long long ll;
typedef unsigned long long ull;

/*
int gcd(int x, int y) {
    if (x < y) swap(x, y);
    return !y ? x : gcd(x % y, y);
}
*/
int main() {
    vector<string> C(3);
    rep(i, 0, 2) cin >> C[i];

    int i = 0;
    do {
        j = C[i].front() - 'a';
        C[i].erase(C[i].begin());
        if (C[i].empty()) {
            break;
        }
        i = j;
    } while (true);

    switch (i) {
        case 0:
            cout << 'A' << endl;
            return 0;
        case 1:
            cout << 'B' << endl;
            return 0;
        case 2:
            cout << 'C' << endl;
            return 0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:9: error: 'j' was not declared in this scope
   64 |         j = C[i].front() - 'a';
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)

int main(){
	vector<string> s(3);
  	for(auto&& u:s)cin>>u;
    vector<int> t(3,0);
  //	rep(i,3)t[i]=s[i].size();
  
  int x=0;
  while(t[x]<s[x].size()){
  t[x]++;
  c=s[x][t[x]-1];  
  }
  cout<<"ABC"[x]<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'c' was not declared in this scope
   14 |   c=s[x][t[x]-1];
      |   ^
Language: C++

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

int main(void){
  string s[3];
  cin>>s[0]>>s[1]>>s[2];
  int p[3]={},q=0;
  while(p[q]!=s[q].size()){
    p[q]++;
    q=s[q][p[q]-1]-'a';
  }
  cout<<(char)('A'+q)<<enld;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: 'enld' was not declared in this scope
   12 |   cout<<(char)('A'+q)<<enld;
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
char a[110],b[110],c[110];
int ax=0,bx=-1,cx=-1;
char cc;
int main()
{
	gets(a);
	gets(b);
	gets(c);
	cc=a[ax];
	while(1)
	{
		if(cc=='a')
		{
			ax++;
			if(a[ax]=='\0')
			{
				cout<<"A";
				return 0;
			}
			cc=a[ax];
		}
		else
		{
			if(cc=='b')
			{
				bx++;
				if(b[bx]=='\0')
				{
					cout<<"B";
					return 0;
				}
				cc=b[bx];
			}
			else if(cc=='c')
			{
				cx++;
				if(c[cx]=='\0')
				{
					cout<<"C";
					return 0;
				}
				cc=c[cx];
			}
		}
	}
	return 0;
}

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

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

int main(){
	string SA,SB,SC,S;
    cin>>SA>>SB>>SC;
    S=SA;
    for(int i=0;i<1000;i++){
    	if(S.at(i)=='a'){
    		if(SA.size()>0){
              SA.erase(SA.begin()+0)
              S=SA;
              continue;
              
    		}
    		if(SA.size()==0){
    			cout<<'A'<<endl;
    			break;
    		}
    	}
    	if(S.at(i)=='b'){
    		if(SB.size()>0){
              SB.erase(SB.begin()+0)
              S=SB;
              continue;
              
    		}
    		if(SB.size()==0){
    			cout<<'B'<<endl;
    			break;
    		}
    	}
    	if(S.at(i)=='c'){
    		if(SC.size()>0){
              SC.erase(SC.begin()+0)
              S=SC;
              continue;
              
    		}
    		if(SC.size()==0){
    			cout<<'C'<<endl;
    			break;
    		}
    	}
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:37: error: expected ';' before 'S'
   11 |               SA.erase(SA.begin()+0)
      |                                     ^
      |                                     ;
   12 |               S=SA;
      |               ~                      
a.cc:23:37: error: expected ';' before 'S'
   23 |               SB.erase(SB.begin()+0)
      |                                     ^
      |                                     ;
   24 |               S=SB;
      |               ~                      
a.cc:35:37: error: expected ';' before 'S'
   35 |               SC.erase(SC.begin()+0)
      |                                     ^
      |                                     ;
   36 |               S=SC;
      |               ~
Language: C++

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

int main(){
	string SA,SB,SC.S;
    cin>>SA>>SB>>SC;
    S=SA
    for(int i=0;i<1000;i++){
    	if(S.at(i)=='a'){
    		if(SA.size()>0){
              SA.erase(SA.begin()+0)
              S=SA;
              continue;
              
    		}
    		if(SA.size()==0){
    			cout<<'A'<<endl;
    			break;
    		}
    	}
    	if(S.at(i)=='b'){
    		if(SB.size()>0){
              SB.erase(SB.begin()+0)
              S=SB;
              continue;
              
    		}
    		if(SB.size()==0){
    			cout<<'B'<<endl;
    			break;
    		}
    	}
    	if(S.at(i)=='c'){
    		if(SC.size()>0){
              SC.erase(SC.begin()+0)
              S=SC;
              continue;
              
    		}
    		if(SC.size()==0){
    			cout<<'C'<<endl;
    			break;
    		}
    	}
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: expected initializer before '.' token
    5 |         string SA,SB,SC.S;
      |                        ^
a.cc:6:18: error: 'SC' was not declared in this scope; did you mean 'SB'?
    6 |     cin>>SA>>SB>>SC;
      |                  ^~
      |                  SB
a.cc:7:5: error: 'S' was not declared in this scope; did you mean 'SB'?
    7 |     S=SA
      |     ^
      |     SB
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int i=0;i<1000;i++){
      |                 ^
Language: C++

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

using namespace std;

int main(){
  string A,B,C; cin >> A >> B >> C;
    
  
  char x = A[0];
  
  while()
  { if(x == 'a'){ 
     if( A.size() == 0){ cout << 'A' << endl; return 0;}
       x = A[0];  A = A.substr(1,A.size() - 1);}
   
    else if(x == 'b'){ 
      if(B.size() == 0){ cout << 'B' << endl; return 0;}
      x = B[0]; B = B.substr(1,B.size() - 1);}
   
    else if(x == 'c'){ 
      if(C.size() == 0){ cout << 'C' << endl; return 0;}
      x = C[0]; C = C.substr(1,C.size() - 1);}
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected primary-expression before ')' token
   13 |   while()
      |         ^
Language: C++

int main(){
  string A,B,C;
  cin>>A>>B>>C;
  char c=A[0];
  A.erase(0,1);
  while(1){
    if(c=='a'){
      if(A.size()==0){
        cout<<'A'<<endl;
        return 0;
      }
      c=A[0]; A.erase(0,1);
    }else if(c=='b'){
      if(B.size()==0){
        cout<<'B'<<endl;
        return 0;
      }
      c=B[0]; B.erase(0,1);
    }else{
      if(C.size()==0){
        cout<<'C'<<endl;
        return 0;
      }
      c=C[0]; C.erase(0,1); 
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string A,B,C;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>A>>B>>C;
      |   ^~~
a.cc:3:8: error: 'A' was not declared in this scope
    3 |   cin>>A>>B>>C;
      |        ^
a.cc:3:11: error: 'B' was not declared in this scope
    3 |   cin>>A>>B>>C;
      |           ^
a.cc:3:14: error: 'C' was not declared in this scope
    3 |   cin>>A>>B>>C;
      |              ^
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout<<'A'<<endl;
      |         ^~~~
a.cc:9:20: error: 'endl' was not declared in this scope
    9 |         cout<<'A'<<endl;
      |                    ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout<<'B'<<endl;
      |         ^~~~
a.cc:15:20: error: 'endl' was not declared in this scope
   15 |         cout<<'B'<<endl;
      |                    ^~~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout<<'C'<<endl;
      |         ^~~~
a.cc:21:20: error: 'endl' was not declared in this scope
   21 |         cout<<'C'<<endl;
      |                    ^~~~
Language: C++

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

int main(){
  string sa,sb,sc;
  cin >> sa >> sb >> sc;
  int turn=0;
  
  while(1){
    if(turn == 0){
      if(sa.size() == 0) break;
      char a = sa.at(0);
      sa.erase(sa.begin + 0);
      if(a == 'b'){
        turn = 1;
      }else if(a == 'c'){
        turn = 2;
      }
    }else if(turn == 1){
      if(sb.size() == 0) break;
      char a = sb.at(0);
      sb.erase(sb.begin + 0);
      if(a == 'a'){
        turn = 0;
      }else if(a == 'c'){
        turn = 2;
      }
    }else if(turn == 2){
      if(sc.size() == 0) break;
      char a = sc.at(0);
      sc.erase(sc.begin + 0);
      if(a == 'a'){
        turn = 0;
      }else if(a == 'b'){
        turn = 1;
      }
    }
  }
  
  if(turn == 0){
    cout << 'A' << endl;
  }else if(turn == 1){
    cout << 'B' << endl;
  }else if(turn == 2){
    cout << 'C' << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   13 |       sa.erase(sa.begin + 0);
      |                ~~~~~~~~ ^ ~
      |                   |       |
      |                   |       int
      |                   <unresolved overloaded function type>
a.cc:22:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   22 |       sb.erase(sb.begin + 0);
      |                ~~~~~~~~ ^ ~
      |                   |       |
      |                   |       int
      |                   <unresolved overloaded function type>
a.cc:31:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   31 |       sc.erase(sc.begin + 0);
      |                ~~~~~~~~ ^ ~
      |                   |       |
      |                   |       int
      |                   <unresolved overloaded function type>
Language: C++

#include<bits/stdc++.h>
using namespace std;
string a,b,c;
void charlie_chance()
{
  if(c.empty())
  {cout<<"C\n";return;}
  c.pop_back();
  switch(c[c.size()-1])
  {
    case 'a': alice_chance(); break;
    case 'b' : bob_chance(); break;
    case 'c' : charlie_chance(); break;
  }
  
}
void bob_chance()
{
  if(b.empty())
  {cout<<"B\n";return;}
  b.pop_back();
  switch(b[b.size()-1])
  {
    case 'a': alice_chance(); break;
    case 'b' : bob_chance(); break;
    case 'c' : charlie_chance(); break;
  }
  
}
void alice_chance()
{
  if(a.empty())
  {cout<<"A\n";return;}
  a.pop_back();
  switch(a[a.size()-1])
  {
    case 'a': alice_chance(); break;
    case 'b' : bob_chance(); break;
    case 'c' : charlie_chance(); break;
  }
  
}
int main()
{
  
  cin>>a>>b>>c;
  alice_chance();
  
  
  
  
  return 0;
}

Compiler output:
a.cc: In function 'void charlie_chance()':
a.cc:11:15: error: 'alice_chance' was not declared in this scope; did you mean 'charlie_chance'?
   11 |     case 'a': alice_chance(); break;
      |               ^~~~~~~~~~~~
      |               charlie_chance
a.cc:12:16: error: 'bob_chance' was not declared in this scope
   12 |     case 'b' : bob_chance(); break;
      |                ^~~~~~~~~~
a.cc: In function 'void bob_chance()':
a.cc:24:15: error: 'alice_chance' was not declared in this scope; did you mean 'charlie_chance'?
   24 |     case 'a': alice_chance(); break;
      |               ^~~~~~~~~~~~
      |               charlie_chance
Language: C++

      ci++;
    }
  }

  if ( len_a < 0 ) cout << "A\n";
  else if ( len_b< 0 ) cout << "B/n";
  else cout << "C\n";

  return 0;

}


Compiler output:
a.cc:1:7: error: 'ci' does not name a type
    1 |       ci++;
      |       ^~
a.cc:2:5: error: expected declaration before '}' token
    2 |     }
      |     ^
a.cc:3:3: error: expected declaration before '}' token
    3 |   }
      |   ^
a.cc:5:3: error: expected unqualified-id before 'if'
    5 |   if ( len_a < 0 ) cout << "A\n";
      |   ^~
a.cc:6:3: error: expected unqualified-id before 'else'
    6 |   else if ( len_b< 0 ) cout << "B/n";
      |   ^~~~
a.cc:7:3: error: expected unqualified-id before 'else'
    7 |   else cout << "C\n";
      |   ^~~~
a.cc:9:3: error: expected unqualified-id before 'return'
    9 |   return 0;
      |   ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string s[3];
  cin >> s[0] >> s[1] >> s[2];
  int n[3],t[3];
  for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
  int now=0;
  while(n[0]&&n[1]&&n[2]){
    n[now]--;
    if(s[now].at(t[now]-n[now]-1)=='a') now=0;
    else if(s[now].at(t[now]-n[now]-1)=='b') now=1;
    else now=2;
  }
  if(now==0) cout << "A" << endl;
  else if(now==1) cout << "B" << endl;
  else cout << "C" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |                                            ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string s[3];
  cin >> s[0] >> s[1] >> s[2];
  int n[3],t[3]
  for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
  int now=0;
  while(n[0]&&n[1]&&n[2]){
    n[now]--;
    if(s[now].at(t[now]-n[now]-1)=='a') now=0;
    else if(s[now].at(t[now]-n[now]-1)=='b') now=1;
    else now=2;
  }
  if(now==0) cout << "A" << endl;
  else if(now==1) cout << "B" << endl;
  else cout << "C" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'for'
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |               ^
a.cc:8:42: error: 't' was not declared in this scope
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |                                          ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string s[3]
  cin >> s[0] >> s[1] >> s[2];
  int n[3],t[3]
  for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
  int now=0;
  while(n[0]&&n[1]&&n[2]){
    n[now]--;
    if(s[now].at(t[now]-n[now]-1)=='a') now=0;
    else if(s[now].at(t[now]-n[now]-1)=='b') now=1;
    else now=2;
  }
  if(now==0) cout << "A" << endl;
  else if(now==1) cout << "B" << endl;
  else cout << "C" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> s[0] >> s[1] >> s[2];
      |   ^~~
a.cc:8:3: error: expected initializer before 'for'
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |               ^
a.cc:8:42: error: 't' was not declared in this scope
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |                                          ^
a.cc:8:47: error: 's' was not declared in this scope
    8 |   for(int i=0;i<3;i++) n[i]=s[i].size(); t[i]=s[i].size();
      |                                               ^
Language: C++

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

int main(){
	string S[3];
	cin >> S[0] >> S[1] >> S[2];
	int now = 0;
	while(1){
		if(S[now].size() == 0){
			printf("%c\n", (char)((int)'a' + now));
			return 0;
		}
		else{
			now = S[now][S[now].size() - 1] - (int)'a';
			S[now].pop_buck();
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_buck'; did you mean 'pop_back'?
   15 |                         S[now].pop_buck();
      |                                ^~~~~~~~
      |                                pop_back