Language: C++

#include <iostream>
#include <string>
#define rep(i, n) for(int i ; i<n; ++i)
use 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:4:1: error: 'use' does not name a type
    4 | use namespace std;
      | ^~~
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:6:9: error: expected primary-expression before 'char'
    6 |     map<char, string> players;
      |         ^~~~
a.cc:8:9: error: 'string' was not declared in this scope
    8 |         string s;
      |         ^~~~~~
a.cc:8:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |         cin>>s;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:14: error: 's' was not declared in this scope
    9 |         cin>>s;
      |              ^
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];
      |                     ^~~~~~
a.cc:18:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |                 cout<<'A'<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |                 cout<<'A'<<endl;
      |                            ^~~~
      |                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:26:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |                 cout<<'B'<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |                 cout<<'B'<<endl;
      |                            ^~~~
      |                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:34:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   34 |                 cout<<'C'<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:34:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   34 |                 cout<<'C'<<endl;
      |                            ^~~~
      |                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~