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

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

class Progaram
{
    static void Main(string[] args)
    {
        var cards = new List<char>[3];
        for (var i = 0; 3 > i; i++)
        {
            cards[i] = Console.ReadLine().ToCharArray().ToList();
        }
        var now = 'a';
        var s = 0;
        while (true)
        {
            if (cards[s].Count == 0)
            {
                Console.WriteLine((s == 0) ? 'A' : (s == 1) ? 'B' : 'C');
                break;
            }
            now = cards[s][0];
            cards[s].RemoveAt(0);
            s = (now == 'a') ? 0 : (now == 'b') ? 1 : 2;
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:7:22: error: 'string' has not been declared
    7 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:7:31: error: expected ',' or '...' before 'args'
    7 |     static void Main(string[] args)
      |                               ^~~~
a.cc:28:2: error: expected ';' after class definition
   28 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Progaram::Main(int*)':
a.cc:9:9: error: 'var' was not declared in this scope
    9 |         var cards = new List<char>[3];
      |         ^~~
a.cc:10:18: error: expected ';' before 'i'
   10 |         for (var i = 0; 3 > i; i++)
      |                  ^
a.cc:10:29: error: 'i' was not declared in this scope
   10 |         for (var i = 0; 3 > i; i++)
      |                             ^
a.cc:12:13: error: 'cards' was not declared in this scope
   12 |             cards[i] = Console.ReadLine().ToCharArray().ToList();
      |             ^~~~~
a.cc:12:24: error: 'Console' was not declared in this scope
   12 |             cards[i] = Console.ReadLine().ToCharArray().ToList();
      |                        ^~~~~~~
a.cc:14:13: error: expected ';' before 'now'
   14 |         var now = 'a';
      |             ^~~
a.cc:15:13: error: expected ';' before 's'
   15 |         var s = 0;
      |             ^
a.cc:18:17: error: 'cards' was not declared in this scope
   18 |             if (cards[s].Count == 0)
      |                 ^~~~~
a.cc:18:23: error: 's' was not declared in this scope
   18 |             if (cards[s].Count == 0)
      |                       ^
a.cc:20:17: error: 'Console' was not declared in this scope
   20 |                 Console.WriteLine((s == 0) ? 'A' : (s == 1) ? 'B' : 'C');
      |                 ^~~~~~~
a.cc:23:13: error: 'now' was not declared in this scope
   23 |             now = cards[s][0];
      |             ^~~
a.cc:23:19: error: 'cards' was not declared in this scope
   23 |             now = cards[s][0];
      |                   ^~~~~
a.cc:23:25: error: 's' was not declared in this scope
   23 |             now = cards[s][0];
      |                         ^
Language: C++

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

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

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

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

#define MAX(a,b) (a > b) ? a : b
#define MIN(a,b) (a < b) ? a : b
const int inf = 1000000000; // 10^9

int main(){
   char a[101],b[101],c[101];scanf("%s %s %s",a,b,c);
   char table = 'a';
   int ta=,tb=0,tc=0;
   for(int i = 0;i < 300;i++){
      if(table == 'a'){
         //printf("aきたよ\n");
         //printf("table:%c\na[ta]:%c\nta:%d\n",table,a[ta],ta);
         table = a[ta];
         ta++;
         if(ta-1 == strlen(a)){
            printf("a\n");
            break;
         }
      }else if(table == 'b'){
         //printf("bきたよ\n");
         //printf("table:%c\nb[tb]:%c\n",table,b[tb]);
         table = b[tb];
         tb++;
         if(tb-1 == strlen(b)){
            printf("b\n");
            break;
         }
      }else if(table == 'c'){
         //printf("cきたよ\n");
         //printf("table:%c\nc[tc]:%c\n",table,c[tc]);
         table = c[tc];
         tc++;
         if(tc-1 == strlen(c)){
            printf("c\n");
            break;
         }
      }
   }
   //printf("何もない");
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:11: error: expected expression before ',' token
   12 |    int ta=,tb=0,tc=0;
      |           ^
Language: C++

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


int main() {
  string SA, SB, SC;
  cin >> SA >> SB >> SC;

char turn = 'a';
int posA = 0, posB = 0, posC = 0;

for (int i=0; i< 310; i++){ 
if (turn == 'a') {
  if (posA >= SA.size()) {
    cout << "A" << endl;
    break;
  }
  turn = SA.at(posA);
  posA ++;
}
else if (turn == 'b') {
  if (posB >= SB.size()) {
    cout << "B" << endl;
    break;
  }
  turn = SB.at(posB);
  posB ++;
}
else if (turn == 'c') 
  if (posC >= SC.size()) {
    cout << "C" << endl;
    break;
  }
  turn = SC.at(posC);
  posC ++;
} 
}  
  
}


Compiler output:
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> st(3);
  vector<int> left(3);
  cin >> st[0] >> st[1] >> st[2];
  left[0] = st[0].size();
  left[1] = st[1].size(); 
  left[2] = st[2].size();
  int turn = 0;
  int subturn = 0;
  while (0 = 0) {
    if (st[turn][0] == 'A') subturn = 0;
    else if (st[turn][0] == 'B') subturn = 1;
    else subturn = 2;

    st[turn] =st[turn].substr(1,st[turn].size() - 1);
    left[turn] -= 1;
    if (left[turn] == 0) break;
    turn = subturn;
  }
  string ans = "";
  if (left[0] == 0) ans = "A";
  else if (left[1] == 0) ans = "B";
  else ans = "C";
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: lvalue required as left operand of assignment
   12 |   while (0 = 0) {
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> st(3)
  vector<int> left(3)
  cin >> st[0] >> st[1] >> st[2];
  left[0] = st[0].size();
  left[1] = st[1].size(); 
  left[2] = st[2].size();
  int turn = 0;
  int subturn = 0;
  while (0 = 0) {
    if (st[turn][0] == 'A') subturn = 0;
    else if (st[turn][0] == 'B') subturn = 1;
    else subturn = 2;

    st[turn] =st[turn].substr(1,st[turn].size() - 1);
    left[turn] -= 1;
    if (left[turn] == 0) break;
    turn = subturn;
  }
  string ans = "";
  if (left[0] == 0) ans = "A";
  else if (left[1] == 0) ans = "B";
  else ans = "C";
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'vector'
    5 |   vector<int> left(3)
      |   ^~~~~~
a.cc:7:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    7 |   left[0] = st[0].size();
      |         ^
a.cc:7:11: error: assignment of read-only location '* std::left'
    7 |   left[0] = st[0].size();
      |   ~~~~~~~~^~~~~~~~~~~~~~
a.cc:8:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    8 |   left[1] = st[1].size();
      |         ^
a.cc:8:11: error: assignment of read-only location '*(std::left + 1)'
    8 |   left[1] = st[1].size();
      |   ~~~~~~~~^~~~~~~~~~~~~~
a.cc:9:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    9 |   left[2] = st[2].size();
      |         ^
a.cc:9:11: error: assignment of read-only location '*(std::left + 2)'
    9 |   left[2] = st[2].size();
      |   ~~~~~~~~^~~~~~~~~~~~~~
a.cc:12:10: error: lvalue required as left operand of assignment
   12 |   while (0 = 0) {
      |          ^
a.cc:18:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |     left[turn] -= 1;
      |              ^
a.cc:18:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |     left[turn] -= 1;
      |     ~~~~~~~~~~~^~~~
a.cc:18:16: error: assignment of read-only location '*(std::left + ((sizetype)turn))'
a.cc:19:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   19 |     if (left[turn] == 0) break;
      |                  ^
a.cc:23:13: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   23 |   if (left[0] == 0) ans = "A";
      |             ^
a.cc:24:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   24 |   else if (left[1] == 0) ans = "B";
      |                  ^
Language: C

#include<stdio.h>
int main(void)[
  char a[100],b[100],c[100],moji;
  int i=1,j=0,k=0;
  scanf("%s",a);
  scanf("%s",b);
  scanf("%s",c);
  moji=a[0];
  while(1){
    while(a[i]=='a'){
      if(a[i]=='\0'){
        printf("A\n");
        break;
      }
      moji=a[i];
      i++;
    }
    while(b[j]=='b'){
      if(b[j]=='\0'){
        printf("B\n");
        break;
      }
      moji=b[j];
      j++;
    }
    while(c[k]=='c'){
      if(c[k]=='\0'){
        printf("C\n");
        break;
      }
      moji=c[k];
      k++;
    }
  }
  return 0;
}
  
    
      

Compiler output:
main.c:3:3: error: expected expression before 'char'
    3 |   char a[100],b[100],c[100],moji;
      |   ^~~~
Language: C

#include<stdio.h>
int main(void){
  char A[100],B[100],c[100],alf[3]={a,b,c};
  int i=0,j=0,k=0,cnt=0;
  scanf("%s",A);
  scanf("%s",B);
  scanf("%s",C);
  while((A[i]!='\0'||B[j]!='\0')||C[k]!='\0')){
    while(A[i]==alf[0]&&A[i]==alf[cnt]){
      i++;
      if(A[i]==alf[1]) cnt++;
      if(A[i]==alf[2]) cnt+=2;
    };
    while(B[j]==alf[1]&&B[j]==alf[cnt]){
      j++;
      if(B[j]==alf[0]) cnt--;
      if(B[j]==alf[2]) cnt++;
    }
    while(C[k]==alf[2]&&c[k]==alf[cnt]){
      k++;
      if(C[k]==alf[0]) cnt-=2;
      if(C[k]==alf[1]) cnt--;
    }
  }
  if(alf[cnt]=='a') printf("A");
  if(alf[cnt]=='b') printf("B");
  if(alf[cnt]=='c') printf("C");
  return 0;
}
      

Compiler output:
main.c: In function 'main':
main.c:3:37: error: 'a' undeclared (first use in this function)
    3 |   char A[100],B[100],c[100],alf[3]={a,b,c};
      |                                     ^
main.c:3:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:39: error: 'b' undeclared (first use in this function)
    3 |   char A[100],B[100],c[100],alf[3]={a,b,c};
      |                                       ^
main.c:3:41: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    3 |   char A[100],B[100],c[100],alf[3]={a,b,c};
      |                                         ^
main.c:3:41: note: (near initialization for 'alf[2]')
main.c:7:14: error: 'C' undeclared (first use in this function)
    7 |   scanf("%s",C);
      |              ^
main.c:8:46: error: expected statement before ')' token
    8 |   while((A[i]!='\0'||B[j]!='\0')||C[k]!='\0')){
      |                                              ^
Language: C++

#include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
using namespace std;

int main(){
    string v[3];
    for(ll i=0;i<3;++i){
        cin>>v[i];
    }
    char ans;
    ll flag=0;

    bool bol=true;
    while(bol){
        if(v[flag].size()==0){
            if(flag==0){
                ans='A'
            }else if(flag==1){
                ans='B';
            }else if(flag=2){
                ans='C';
            }
        }else if(v[flag][0]=='a'){
            v[flag]= v[flag].substr(1,v[flag].size());
            flag=0;
        }else if(v[flag][0]=='b'){
            v[flag]= v[flag].substr(1,v[flag].size());
            flag=1;
        }else if(v[flag][0]=='c'){
            v[flag]= v[flag].substr(1,v[flag].size());
            flag=2;
        }
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ';' before '}' token
   18 |                 ans='A'
      |                        ^
      |                        ;
   19 |             }else if(flag==1){
      |             ~
Language: C++

#include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
using namespace std;

int main(){
    string v[3];
    for(ll i=0;i<3;++i){
        cin>>v[i];
    }
    char ans;
    ll flag=0;

    bool bol=true;
    while(bol){
        if(v[flag].size()==0){
            if(flag==0){
                ans='A'
            }else if(flag==1){
                ans='B';
            }else if(flag=2){
                ans='C';
            }
        }else if(v[flag][0]=='a'){
            v[flag]= v[flag].substr(1,v[flag].size());
            flag=0;
        }else if(v[flag][0]=='b'){
            v[flag]= v[flag].substr(1,v[flag].size());
            flag=1;
        }else if(v[flag][0]=='c'){
            v[flag]= v[flag].substr(1,v[flag].size());
            flag=2;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ';' before '}' token
   18 |                 ans='A'
      |                        ^
      |                        ;
   19 |             }else if(flag==1){
      |             ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  map<char,string> mp;
  cin >> mp['a'] >> mp['b'] >> mp['c'];
  char turn = 'a';
  while(true){
    if(mp[turn].size()==0){
      switch(turn){
        case 'a':
          string output = "A";
          break;
        case 'b':
          string output = "B";
          break;
        case 'c':
          string output = "C";
          break;
      }
      cout << output << endl;
      break;
    }
    turn = mp[turn].at(0);
    if(mp[turn].size()>1){
	    mp[turn] = mp[turn].substr(1);
    } else{
       mp[turn] = "";
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: jump to case label
   14 |         case 'b':
      |              ^~~
a.cc:12:18: note:   crosses initialization of 'std::string output'
   12 |           string output = "A";
      |                  ^~~~~~
a.cc:15:18: error: redeclaration of 'std::string output'
   15 |           string output = "B";
      |                  ^~~~~~
a.cc:12:18: note: 'std::string output' previously declared here
   12 |           string output = "A";
      |                  ^~~~~~
a.cc:17:14: error: jump to case label
   17 |         case 'c':
      |              ^~~
a.cc:12:18: note:   crosses initialization of 'std::string output'
   12 |           string output = "A";
      |                  ^~~~~~
a.cc:18:18: error: redeclaration of 'std::string output'
   18 |           string output = "C";
      |                  ^~~~~~
a.cc:12:18: note: 'std::string output' previously declared here
   12 |           string output = "A";
      |                  ^~~~~~
a.cc:21:15: error: 'output' was not declared in this scope
   21 |       cout << output << endl;
      |               ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
main(){
  map<char,string> m;
string a,b,c;cin>>a>>b>>c;
m['a']=a;
m['b']=b;
m['c']=c;
char t='a';
while(1){
  if(m[t].size()==0){cout<<(char)('A'+t-'a');return 0;}
char tm=m[t][0];
m[t].pop_front();
t=tm;}}


Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:6: error: 'std::map<char, std::__cxx11::basic_string<char> >::mapped_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_front'
   13 | m[t].pop_front();
      |      ^~~~~~~~~
Language: C++

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

int main() {
  string SA,SB,SC;
  cin >> SA;
  cin >> SB;
  cin >> SC;
  string S = SA;
  char c = 'a';
  while(true){
    if(S.at(0) == 'a'){
      S.erase(S.begin());
      if(c == 'a'){
        SA = S;
      }
      else if(c == 'b'){
        SB = S;
      }
      else{
        SC = S;
      }
      S = SA;
      c = 'a';
    }
    else if(S.at(0) == 'b'){
      S.erase(S.begin());
      if(c == 'a'){
        SA = S;
      }
      else if(c == 'b'){
        SB = S;
      }
      else{
        SC = S;
      }
      S = SB;
      c = 'b';
    }
    else{
      S.erase(S.begin());
      if(c == 'a'){
        SA = S;
      }
      else if(c == 'b'){
        SB = S;
      }
      else{
        SC = S;
      }
      S = SC;
      c = 'c';
    }
    if(S == ""){]
      if(c == 'a'){
        cout << 'A' << endl;
      }
      else if(c == 'b'){
        cout << 'B' << endl;
      }
      else{
        cout << 'C' << endl;
      }
      break;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:17: error: expected primary-expression before ']' token
   54 |     if(S == ""){]
      |                 ^
a.cc:58:7: error: expected '}' before 'else'
   58 |       else if(c == 'b'){
      |       ^~~~
a.cc:54:16: note: to match this '{'
   54 |     if(S == ""){]
      |                ^
a.cc: At global scope:
a.cc:67:1: error: expected declaration before '}' token
   67 | }
      | ^
Language: C++

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

int main() {
  string SA,SB,SC;
  cin >> SA;
  cin >> SB;
  cin >> SC;
  string S = SA;
  char c = 'a';
  while(true){
    if(S.at(0) == 'a'){
      S.erase(S.begin());
      if(c == 'a'){
        SA = S;
      }
      else if(c == 'b'){
        SB = S;
      }
      else{
        SC = S;
      }
      S = SA;
      c = 'a';
    }
    else if(S.at(0) == 'b'){
      S.erase(S.begin());
      if(c == 'a'){
        SA = S;
      }
      else if(c == 'b'){
        SB = S;
      }
      else{
        SC = S;
      }
      S = SB;
      c = 'b';
    }
    else{
      S.erase(S.begin());
      if(c == 'a'){
        SA = S;
      }
      else if(c == 'b'){
        SB = S;
      }
      else{
        SC = S;
      }
      S = SC;
      c = 'c';
    }
    if(S == ""){
      cout << c << endl;
      break;
    }
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string a,b,c;
  cin >> a >> b >> c;
  int ac = a.size(),bc = b.size(),cc = c.size();
  char now = 'a';
  while(a.size() > 0 && b.size() > 0 && c.size() > 0){
    if(now = 'a'){
      if(a.at[0] = 'a'){
        a.erase(0,0);
        now = 'a';
      }
      else if(a.at[0] = 'b'){
        b.erase(0,0);
        now = 'b';
      }
      else{
        c.erase(0,0);
        now = 'c';
      }
    }
    if(now = 'b'){
      if(b.at[0] = 'a'){
        a.erase(0,0);
        now = 'a';
      }
      else if(b.at[0] = 'b'){
        b.erase(0,0);
        now = 'b';
      }
      else{
        c.erase(0,0);
        now = 'c';
      }
    }
    if(now = 'c'){
      if(c.at[0] = 'a'){
        a.erase(0,0);
        now = 'a';
      }
      else if(c.at[0] = 'b'){
        b.erase(0,0);
        now = 'b';
      }
      else{
        c.erase(0,0);
        now = 'c';
      }
    }
  }
  if(now = 'a')
    cout << 'A' << endl;
  else if(now = 'b')
    cout << 'B' << endl;
  else
    cout << 'C' << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   10 |       if(a.at[0] = 'a'){
      |              ^
a.cc:14:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |       else if(a.at[0] = 'b'){
      |                   ^
a.cc:24:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   24 |       if(b.at[0] = 'a'){
      |              ^
a.cc:28:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   28 |       else if(b.at[0] = 'b'){
      |                   ^
a.cc:38:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   38 |       if(c.at[0] = 'a'){
      |              ^
a.cc:42:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   42 |       else if(c.at[0] = 'b'){
      |                   ^
Language: C++

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

int main(){
  string s[3];
  for(int i=0;i<3;++I){
    cin >> s[i];
  }
  
  int turn =0;
  while(true){
    int now = turn;
    if(s[now].empty())break;
    turn = s[now][0] -'a';//s[now][0]==s[i].at(0)
    s[now].erase(0,1);
  }
  if(turn == 0)cout << 'A' << endl;
  else if(turn == 1)cout << 'B' << endl;
  else cout << 'C' << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'I' was not declared in this scope
    6 |   for(int i=0;i<3;++I){
      |                     ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<map>
#include<stdio.h>
#include<vector>
using namespace std;
#define rep(s,i,n) for(int i=s;i<n;i++)
#define c(n) cout<<n<<endl;
#define ic(n) int n;cin>>n;
#define sc(s) string s;cin>>s;
#define mod 1000000007
#define f first
#define s second
int a[114514],b[114514],c[8];
int ans[114514][8];
signed main(){
	sc(a) sc(b) sc(c) 
	char t=a;
	int aa,bb,cc=0;
	rep(0,i,810){
		if(t=='a'){
			if(aa==a.size()){
				cout<<'A'<<endl;
				return 0;
			}
			t=a[aa];
			aa++;
		}
		else if(t=='b'){
			if(bb==b.size()){
				cout<<'B'<<endl;
				return 0;
			}
			t=b[bb];
			bb++;
		}
		else if(t=='c'){
			if(cc==c.size()){
				cout<<'C'<<endl;
				return 0;
			}
			t=c[cc];
			cc++;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
   19 |         char t=a;
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
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 turn=0;
  char winner;
  while(1){
    if(S.at(turn).size()==0){
      switch(turn){
        case 0:
          winner='a';
          break;
        case 1:
          winner='b';
          break;
       case 2:
          winner='c';
          break;
      }
      break;
    }
    char x=S.at(turn).front();
    S.at(turn).pop_front();
    switch(x){
      case 'a':
        turn=0;
        break;
      case 'b':
        turn=1;
        break;
      case 'c':
        turn=2;
        break;
    }
  }
  cout<<winner <<endl;
}
    
          

Compiler output:
a.cc: In function 'int main()':
a.cc:26:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_front'
   26 |     S.at(turn).pop_front();
      |                ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    //現在, 文字列のうち,　先頭から何番目に位置するかを示す
  map<char, int> pages;
  
  map<char, string> cards;
  
  cin >> cards['a'] >> cards['b'] >> cards['c'];
  
  char turn = 'a'; //現在が誰のターンであるかを示す
  
  //ターンの人がカードをすべて使い切ったか否かを確認する.
  while (pages[turn] != cards[turn].size()) {
      
    turn = cards[turn][pages[turn]++];
    cout << turn << pages[turn] << endl;
    
  }
  
  cout <<　(char)toupper(turn) << endl;
}

Compiler output:
a.cc:22:10: error: extended character 　 is not valid in an identifier
   22 |   cout <<　(char)toupper(turn) << endl;
      |          ^
a.cc: In function 'int main()':
a.cc:22:13: error: expected primary-expression before 'char'
   22 |   cout <<　(char)toupper(turn) << endl;
      |             ^~~~
a.cc:22:10: error: '\U00003000' was not declared in this scope
   22 |   cout <<　(char)toupper(turn) << endl;
      |          ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before '<' token
   12 |     if(ai=<A.size()){
      |           ^
a.cc:16:11: error: expected primary-expression before '<' token
   16 |     if(bi=<B.size()){
      |           ^
a.cc:20:11: error: expected primary-expression before '<' token
   20 |     if(ci=<C.size()){
      |           ^
Language: Java

import sun.text.normalizer.UCharacter;

import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String a = sc.next(),b=sc.next(),c=sc.next();
        int ptA=0,ptB=0,ptC=0;

        char next = 'a';
        while(true){
            if(next == 'a'){
                if(ptA==a.length())break;
                next=a.charAt(ptA);
                ptA++;

            }else if(next =='b'){
                if(ptB==b.length())break;
                next=b.charAt(ptB);
                ptB++;

            }else{
                if(ptC==c.length())break;
                next = c.charAt(ptC);
                ptC++;

            }
        }

        if(next =='a')next='A';
        else if(next=='b')next='B';
        else next='C';
        System.out.println(next);




    }
}


Compiler output:
Main.java:1: error: package sun.text.normalizer does not exist
import sun.text.normalizer.UCharacter;
                          ^
1 error
Language: C++

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

int main() {

	string A,B,C;
	cin>>A>>B>>C;
  A.push_back('w');  B.push_back('w');  C.push_back('w');
  char turn ='a';
	int a=0,b=0,c=0;
 while(true){
  if(turn=='a'){
    if(A.at(a)=='w'){cout<<A<<endl;break;}
    turn = A.at(a); a++; }
   if(turn=='b'){
    if(B.at(b)=='w'){cout<<B<<endl;break;}
    turn = B.at(b); b++; }
   if(turn=='c'){
    if(C.at(c)=='w'){cout<<C<<endl;break;}
    turn = C.at(c); c++; }
 }
	cout<< <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: expected primary-expression before '<<' token
   22 |         cout<< <<endl;
      |                ^~
Language: C++

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

int main() {

	string A,B,C;
	cin>>A>>B>>C;
  A.push_back('w');  B.push_back('w');  C.push_back('w');
  char turn ='a'
	int a=0,b=0,c=0;
 while(true){
  if(turn=='a'){
    if(A.at(a)=='w'){cout<<A<<endl;break;}
    turn = A.at(a); a++; }
   if(turn=='b'){
    if(B.at(b)=='w'){cout<<B<<endl;break;}
    turn = B.at(b); b++; }
   if(turn=='c'){
    if(C.at(c)=='w'){cout<<C<<endl;break;}
    turn = C.at(c); c++; }
 }
	cout<< <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'int'
   10 |         int a=0,b=0,c=0;
      |         ^~~
a.cc:13:13: error: 'a' was not declared in this scope
   13 |     if(A.at(a)=='w'){cout<<A<<endl;break;}
      |             ^
a.cc:14:17: error: 'a' was not declared in this scope
   14 |     turn = A.at(a); a++; }
      |                 ^
a.cc:16:13: error: 'b' was not declared in this scope
   16 |     if(B.at(b)=='w'){cout<<B<<endl;break;}
      |             ^
a.cc:17:17: error: 'b' was not declared in this scope
   17 |     turn = B.at(b); b++; }
      |                 ^
a.cc:19:13: error: 'c' was not declared in this scope
   19 |     if(C.at(c)=='w'){cout<<C<<endl;break;}
      |             ^
a.cc:20:17: error: 'c' was not declared in this scope
   20 |     turn = C.at(c); c++; }
      |                 ^
a.cc:22:16: error: expected primary-expression before '<<' token
   22 |         cout<< <<endl;
      |                ^~
Language: C++

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

stack<char> sa;
stack<char> sb;
stack<char> sc;

int main(){
	string a,b,c;
  cin>>a>>b>>c;
  for(int i=0;i<a.size();i++){
  	sa.push(a[i]);
  }
  for(int i=0;i<b.size();i++){
  	sb.push(b[i]);
  }
  for(int i=0;i<c.size();i++){
  	sc.push(c[i]);
  }
  char val='a';
  while(true){
  	if(val=='a'){
    	k=sa.top();
      sa.pop();
    }
    else if(val=='b'){
    	k=sb.top();
      sb.pop();
    }
    else{
      k=sc.top();
      sc.pop();
    }
    if(sa.size()==0){
      cout<<"A";
      return 0;
    }
    if(sb.size()==0){
      cout<<"B";
      return 0;
    }
    if(sc.size()==0){
      cout<<"C";
      return 0;
    }
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'k' was not declared in this scope
   23 |         k=sa.top();
      |         ^
a.cc:27:9: error: 'k' was not declared in this scope
   27 |         k=sb.top();
      |         ^
a.cc:31:7: error: 'k' was not declared in this scope
   31 |       k=sc.top();
      |       ^
Language: C++

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

int main()
{
    in.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Timer TM;
 
    
    string a[10];
    cin>>a[0]>>a[1]>>a[2];
    ll now=0;
    while(a[now].size()>0){
        ll Now=now;
        Now=a[now][0]-'a';
        a[now]=a[now].substr(1);
        now=Now;
    }
    cout<<(char)(now+'A')<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'in' was not declared in this scope; did you mean 'yn'?
    6 |     in.tie(0);
      |     ^~
      |     yn
a.cc:9:5: error: 'Timer' was not declared in this scope
    9 |     Timer TM;
      |     ^~~~~
a.cc:14:5: error: 'll' was not declared in this scope
   14 |     ll now=0;
      |     ^~
a.cc:15:13: error: 'now' was not declared in this scope; did you mean 'pow'?
   15 |     while(a[now].size()>0){
      |             ^~~
      |             pow
a.cc:16:11: error: expected ';' before 'Now'
   16 |         ll Now=now;
      |           ^~~~
      |           ;
a.cc:17:9: error: 'Now' was not declared in this scope; did you mean 'pow'?
   17 |         Now=a[now][0]-'a';
      |         ^~~
      |         pow
a.cc:21:18: error: 'now' was not declared in this scope; did you mean 'pow'?
   21 |     cout<<(char)(now+'A')<<endl;
      |                  ^~~
      |                  pow
Language: C++

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

int main()
{
    in.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Timer TM;
 
    
    string a[10];
    cin>>a[0]>>a[1]>>a[2];
    ll now=0;
    while(a[now].size()>0){
        ll Now=now;
        Now=a[now][0]-'a';
        a[now]=a[now].substr(1);
        now=Now;
    }
    cout<<(char)(now+'A')<<endl;
    return 0;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'in' was not declared in this scope; did you mean 'yn'?
    6 |     in.tie(0);
      |     ^~
      |     yn
a.cc:9:5: error: 'Timer' was not declared in this scope
    9 |     Timer TM;
      |     ^~~~~
a.cc:14:5: error: 'll' was not declared in this scope
   14 |     ll now=0;
      |     ^~
a.cc:15:13: error: 'now' was not declared in this scope; did you mean 'pow'?
   15 |     while(a[now].size()>0){
      |             ^~~
      |             pow
a.cc:16:11: error: expected ';' before 'Now'
   16 |         ll Now=now;
      |           ^~~~
      |           ;
a.cc:17:9: error: 'Now' was not declared in this scope; did you mean 'pow'?
   17 |         Now=a[now][0]-'a';
      |         ^~~
      |         pow
a.cc:21:18: error: 'now' was not declared in this scope; did you mean 'pow'?
   21 |     cout<<(char)(now+'A')<<endl;
      |                  ^~~
      |                  pow
a.cc: At global scope:
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: Java

import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   char[] a = sc.next().toCharArray();
   char[] b = sc.next().toCharArray();
   char[] c = sc.next().toCharArray();
   
   int an = a.length;
   int bn = b.length;
   int cn = c.length;
   
   int acount=0;
   int bcount=0;
   int ccount=0;
 
   char tmp = 'a';
   char ans ;
   for(int i=0;i<=an+bn+cn;i++) 
   {
     if(i==0)
     {
       tmp = a[acount];
       acount++;
     }
     else
     {
       if(tmp=='a')
       {
         if(acount==an)
         {
           ans='A';
           break;
         }
         else
         {
         tmp = a[acount];
         acount++;
         }
       }
       else if(tmp =='b')
       {
         if(bcount==bn)
         {
           ans='B';
           break;
         }
         else
         {
         tmp = b[bcount];
         bcount++;
         }
       }
       else
       {
         if(ccount==cn)
         {
           ans='C';
           break;
         }
         else
         {
         tmp = b[ccount];
         ccount++;
         }
       }
     }
   }
   System.out.println(ans);
 }
}

Compiler output:
Main.java:70: error: variable ans might not have been initialized
   System.out.println(ans);
                      ^
1 error
Language: C++

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



int main(void){
  string a,b,c;cin>>a>>b>>c;


  int flag=1;
  char turn=a[0];
  a.erase(0,1);
  while(flag==1){
    if(turn == 'a'){
      if (a.size()==0){
        cout<<"A"<<endl;
        flag=0;
      }else{
        turn=a[0];
        a.erase(0,1);
      }
    }else if(turn =='b'){
      if(b.size()==0){
        cout<<"B"<<endl;
        flag=0;
      }else{
        turn=b[0];
        b.erase(0,1);
      }

    }else if(turn =='c'){
      if(c.size()==0){
        cout<<"C"<<endl;
        flag=0;
      }else{
        turn=c[0];
        c.erase(0,1);
      }
    }
  }
}


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

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

int main() {
    int turn = 1;
    char S1[200],S2[200],S3[200];
    queue<int> A,B,C;
    scanf("%s", S1);
    for (int i=0;i<strlen(S1);i++) {
        A.push(S1[i]);
    }
    scanf("%s", S2);
    for (int i=0;i<strlen(S2);i++) {
        B.push(S2[i]);
    }
    scanf("%s", S3);
    for (int i=0;i<strlen(S3);i++) {
        C.push(S3[i]);
    }
    while (true) {
        // Alice's turn
        if (turn == 1) {
            //printf("Alice\n");
            if (A.empty()) {
                cout << "A\n";
                return 0;
            }
            if (A.front()=='b') {
                turn = 2;
            } else if (A.front()=='c') {
                turn = 3;
            }
            A.pop();
            
        } else if (turn == 2) {
            //printf("Bob\n");
            if (B.empty()) {
                cout << "B\n";
                return 0;
            }
            if (B.front()=='a') {
                turn = 1;
            } else if (B.front()=='c') {
                turn = 3;
            }
            B.pop();
            
        } else if (turn == 3) {
            //printf("Charlie\n");
            if (C.empty()) {
                cout << "C\n";
                return 0;
            }
            if (C.front()=='a') {
                turn = 1;
            } else if (C.front()=='b') {
                turn = 2;
            }
            C.pop();
            
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'strlen' was not declared in this scope
   11 |     for (int i=0;i<strlen(S1);i++) {
      |                    ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <queue>
  +++ |+#include <cstring>
    3 | #include <string>
a.cc:15:20: error: 'strlen' was not declared in this scope
   15 |     for (int i=0;i<strlen(S2);i++) {
      |                    ^~~~~~
a.cc:15:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:19:20: error: 'strlen' was not declared in this scope
   19 |     for (int i=0;i<strlen(S3);i++) {
      |                    ^~~~~~
a.cc:19:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main() {
    int turn = 1;
    char S1[200],S2[200],S3[200];
    queue<int> A,B,C;
    scanf("%s", S1);
    for (int i=0;i<strlen(S1);i++) {
        A.push(S1[i]);
    }
    scanf("%s", S2);
    for (int i=0;i<strlen(S2);i++) {
        B.push(S2[i]);
    }
    scanf("%s", S3);
    for (int i=0;i<strlen(S3);i++) {
        C.push(S3[i]);
    }
    while (true) {
        // Alice's turn
        if (turn == 1) {
            //printf("Alice\n");
            if (A.empty()) {
                cout << "A\n";
                return 0;
            }
            if (A.front()=='b') {
                turn = 2;
            } else if (A.front()=='c') {
                turn = 3;
            }
            A.pop();
            
        } else if (turn == 2) {
            //printf("Bob\n");
            if (B.empty()) {
                cout << "B\n";
                return 0;
            }
            if (B.front()=='a') {
                turn = 1;
            } else if (B.front()=='c') {
                turn = 3;
            }
            B.pop();
            
        } else if (turn == 3) {
            //printf("Charlie\n");
            if (C.empty()) {
                cout << "C\n";
                return 0;
            }
            if (C.front()=='a') {
                turn = 1;
            } else if (C.front()=='b') {
                turn = 2;
            }
            C.pop();
            
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'strlen' was not declared in this scope
   10 |     for (int i=0;i<strlen(S1);i++) {
      |                    ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <queue>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc:14:20: error: 'strlen' was not declared in this scope
   14 |     for (int i=0;i<strlen(S2);i++) {
      |                    ^~~~~~
a.cc:14:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:18:20: error: 'strlen' was not declared in this scope
   18 |     for (int i=0;i<strlen(S3);i++) {
      |                    ^~~~~~
a.cc:18:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

A = list(input())
B = list(input())
C = list(input())
#終わり条件（手札を持っていない条件を定義)
A.append('f')
B.append('f')
C.append('f')

now = A.pop(0)

while(len(A) != 0 and len(B) != 0 and len(C) != 0):
    if(now == 'a'):
        now = A.pop(0)
        if(len(A) == 0):
            winner = 'A'
    elif(now == 'b'):
        now = B.pop(0)
        if(len(B) == 0):
            winner = 'B'
    elif(now == 'c'):
        now = C.pop(0)
        if(len(C) ==0):
            winner = 'C'

print(winner)
    


Compiler output:
a.cc:4:2: error: invalid preprocessing directive #\U00007d42\U0000308f\U0000308a\U00006761\U00004ef6\U0000ff08\U0000624b\U0000672d\U00003092\U00006301\U00003063\U00003066\U00003044\U0000306a\U00003044\U00006761\U00004ef6\U00003092\U00005b9a\U00007fa9
    4 | #終わり条件（手札を持っていない条件を定義)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'A' does not name a type
    1 | A = list(input())
      | ^
Language: Java

import java.util.Scanner;

public class ABC045B {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		String C = sc.next();
		String[] S = new String[] {A,B,C};
		sc.close();
		int num = 0;
		while(S[num].length() != 0) {
			int cnt = S[num].charAt(0) - 'a';
			S[num] = S[num].substring(1);
			num = cnt;
		}
		System.out.println((char)('A' + num));
	}
}

Compiler output:
Main.java:3: error: class ABC045B is public, should be declared in a file named ABC045B.java
public class ABC045B {
       ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		StringBuilder sa = new StringBuilder(in.next());
		StringBuilder sb = new StringBuilder(in.next());
		StringBuilder sc = new StringBuilder(in.next());

		char nextTurn = 'a';
		int N = sa.length() + sb.length() + sc.length();
		for (int i = 0; i < N; i++) {
			if (nextTurn == 'a') {
				if (sa.length() == 0) {
					System.out.println("A");
					break;
				}
				nextTurn = sa.charAt(0);
				sa.delete(0, 1);
			} else if (nextTurn == 'b') {
				if (sb.length() == 0) {
					System.out.println("B");
					break;
				}
				nextTurn = sb.charAt(0);
				sb.delete(0, 1);
			} else {
				if (sc.length() == 0) {
					System.out.println("C");
					break;
				}
				nextTurn = sc.charAt(0);
				sc.delete(0, 1);
			}
		}
		in.close();
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

include <bits/stdc++.h>
using namespace std;
    int i,j,y,x=1,m1,m2,m3;
    string a,b,c;
    bool t=0;

int main()
{
    cin>>a>>b>>c;
    while(t==0)
    {
        if(x==1)
        {
            if(m1==a.size())
            {
                cout<<"A"<<endl;
                t=1;
                return 0;
            }
            if(a[i]=='b')
                x=2;
            else if(a[i]=='c')
                x=3;
            else
                x=1	;
            m1++;
            i++;

        }
        if(x==2)
        {
            if(m2==b.size())
            {
                cout<<"B"<<endl;
                t=1;
                return 0;
            }
            if(b[j]=='a')
                x=1;
            else if(b[j]=='c')
                x=3;
            else
                x=2;
            m2++;
            j++;


        }
        if(x==3)
        {
            if(m3==c.size())
            {
                cout<<"C"<<endl;
                t=1;
                return 0;
            }
            if(c[y]=='a')
                x=1;
            else if(c[y]=='b')
                x=2;
            else
                x=3;
            m3++;
            y++;

        }
    }
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:4:5: error: 'string' does not name a type
    4 |     string a,b,c;
      |     ^~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin>>a>>b>>c;
      |     ^~~
a.cc:9:10: error: 'a' was not declared in this scope
    9 |     cin>>a>>b>>c;
      |          ^
a.cc:9:13: error: 'b' was not declared in this scope
    9 |     cin>>a>>b>>c;
      |             ^
a.cc:9:16: error: 'c' was not declared in this scope
    9 |     cin>>a>>b>>c;
      |                ^
a.cc:16:17: error: 'cout' was not declared in this scope
   16 |                 cout<<"A"<<endl;
      |                 ^~~~
a.cc:16:28: error: 'endl' was not declared in this scope
   16 |                 cout<<"A"<<endl;
      |                            ^~~~
a.cc:34:17: error: 'cout' was not declared in this scope
   34 |                 cout<<"B"<<endl;
      |                 ^~~~
a.cc:34:28: error: 'endl' was not declared in this scope
   34 |                 cout<<"B"<<endl;
      |                            ^~~~
a.cc:53:17: error: 'cout' was not declared in this scope
   53 |                 cout<<"C"<<endl;
      |                 ^~~~
a.cc:53:28: error: 'endl' was not declared in this scope
   53 |                 cout<<"C"<<endl;
      |                            ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   16 |       A.pop_back;
      |       ~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:20:9: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   20 |       B.pop_back;
      |       ~~^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:24:9: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   24 |       C.pop_back;
      |       ~~^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~