Language: C++

#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#include <iomanip>
#include <map>
#include <bits/stl_numeric.h>

#define DEBUG 0
#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;


int main(){

    string s[3];
    cin >> s[0];
    cin >> s[1];
    cin >> s[2];

    vector <int> num(3, 0);

    //ターン:0(Aさん),1(Bさん),2(Cさん)
    int turn = 0;
    bool flg = true;

    while(flg)
    {

        for(int i = 0; i < 3; ++i)
        {
            if(turn == i)
            {
                turn = s[i] - 'a';
                ++num[i];
            }
        }

        for(int i = 0; i < 3; ++i)
        {
            if(num[i] >= s[i].size())
            {
                string res = 'A' + i;
                flg = false;
                return 0;
            }
        }
    }


    cout << res << endl;

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:38:29: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
   38 |                 turn = s[i] - 'a';
      |                        ~~~~ ^ ~~~
      |                           |   |
      |                           |   char
      |                           std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
                 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/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:38:31: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   38 |                 turn = s[i] - 'a';
      |                               ^~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:38:31: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   38 |                 turn = s[i] - 'a';
      |                               ^~~
a.cc:47:34: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   47 |                 string res = 'A' + i;
      |                              ~~~~^~~
a.cc:55:13: error: 'res' was not declared in this scope
   55 |     cout << res << endl;
      |             ^~~