Language: C++

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

int main() {
  vector<vector<char>> B(3, vector<char>(3));
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> B.at(i).at(j);
    }
  }
  int n;
  vector<char> C(n);
  for(int i=0;i<n;i++) {
    cin >> C.at(i);
  }
  
  bool K=false;
  
  for(int i=0;i<3;i++) {
    for(int j=0;j<3;j++) {
      for(int l=0;l<n;l++) {
    if(B.at(i).at(j)==C.at(l)) {
      B.at(i).at(j)="o";
    }
        else {
        }
      }
    }
  }
  
  for(int i=0;i<3;i++) {
      if(B.at(i).at(1)=="o"&&B.at(i).at(2)=="o"&&B.at(i).at(3)=="o"){
        bool K=true;
      }
  }
  for(int i=0;i<3;i++) {
    if(B.at(1).at(i)=="o"&&B.at(2).at(i)=="o"&&B.at(3).at(i)=="o"){
        bool K=true;
      }
  }
  if(B.at(1).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(3).at(3)=="o") {
    bool K=true;
  }
  else if(B.at(3).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(1).at(3)=="o") {
    bool K=true;
  }
  else {
  }
  if(K==true) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   23 |       B.at(i).at(j)="o";
      |                     ^~~
      |                     |
      |                     const char*
a.cc:32:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |       if(B.at(i).at(1)=="o"&&B.at(i).at(2)=="o"&&B.at(i).at(3)=="o"){
      |          ~~~~~~~~~~~~~^~~~~
a.cc:32:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |       if(B.at(i).at(1)=="o"&&B.at(i).at(2)=="o"&&B.at(i).at(3)=="o"){
      |                              ~~~~~~~~~~~~~^~~~~
a.cc:32:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |       if(B.at(i).at(1)=="o"&&B.at(i).at(2)=="o"&&B.at(i).at(3)=="o"){
      |                                                  ~~~~~~~~~~~~~^~~~~
a.cc:37:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   37 |     if(B.at(1).at(i)=="o"&&B.at(2).at(i)=="o"&&B.at(3).at(i)=="o"){
      |        ~~~~~~~~~~~~~^~~~~
a.cc:37:41: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   37 |     if(B.at(1).at(i)=="o"&&B.at(2).at(i)=="o"&&B.at(3).at(i)=="o"){
      |                            ~~~~~~~~~~~~~^~~~~
a.cc:37:61: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   37 |     if(B.at(1).at(i)=="o"&&B.at(2).at(i)=="o"&&B.at(3).at(i)=="o"){
      |                                                ~~~~~~~~~~~~~^~~~~
a.cc:41:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   41 |   if(B.at(1).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(3).at(3)=="o") {
      |      ~~~~~~~~~~~~~^~~~~
a.cc:41:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   41 |   if(B.at(1).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(3).at(3)=="o") {
      |                          ~~~~~~~~~~~~~^~~~~
a.cc:41:59: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   41 |   if(B.at(1).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(3).at(3)=="o") {
      |                                              ~~~~~~~~~~~~~^~~~~
a.cc:44:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   44 |   else if(B.at(3).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(1).at(3)=="o") {
      |           ~~~~~~~~~~~~~^~~~~
a.cc:44:44: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   44 |   else if(B.at(3).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(1).at(3)=="o") {
      |                               ~~~~~~~~~~~~~^~~~~
a.cc:44:64: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   44 |   else if(B.at(3).at(1)=="o"&&B.at(2).at(2)=="o"&&B.at(1).at(3)=="o") {
      |                                                   ~~~~~~~~~~~~~^~~~~