Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int s;
  cin >> s;
  if(s.at(0) == s.at(1) && s.at(1) == s.at(2)){
      cout << "Yes" << endl;
  }else if(s.at(0) == s.at(1) && s.at(1) == s.at(3)){
      cout << "Yes" << endl;
  }else if(s.at(0) == s.at(2) && s.at(2) == s.at(1)){
     cout << "Yes" << endl;
  }else if(s.at(1) == s.at(2) && s.at(2) == s.at(3)){
     cout << "Yes" << endl;
  }else{
     cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: request for member 'at' in 's', which is of non-class type 'int'
    6 |   if(s.at(0) == s.at(1) && s.at(1) == s.at(2)){
      |        ^~
a.cc:6:19: error: request for member 'at' in 's', which is of non-class type 'int'
    6 |   if(s.at(0) == s.at(1) && s.at(1) == s.at(2)){
      |                   ^~
a.cc:6:30: error: request for member 'at' in 's', which is of non-class type 'int'
    6 |   if(s.at(0) == s.at(1) && s.at(1) == s.at(2)){
      |                              ^~
a.cc:6:41: error: request for member 'at' in 's', which is of non-class type 'int'
    6 |   if(s.at(0) == s.at(1) && s.at(1) == s.at(2)){
      |                                         ^~
a.cc:8:14: error: request for member 'at' in 's', which is of non-class type 'int'
    8 |   }else if(s.at(0) == s.at(1) && s.at(1) == s.at(3)){
      |              ^~
a.cc:8:25: error: request for member 'at' in 's', which is of non-class type 'int'
    8 |   }else if(s.at(0) == s.at(1) && s.at(1) == s.at(3)){
      |                         ^~
a.cc:8:36: error: request for member 'at' in 's', which is of non-class type 'int'
    8 |   }else if(s.at(0) == s.at(1) && s.at(1) == s.at(3)){
      |                                    ^~
a.cc:8:47: error: request for member 'at' in 's', which is of non-class type 'int'
    8 |   }else if(s.at(0) == s.at(1) && s.at(1) == s.at(3)){
      |                                               ^~
a.cc:10:14: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |   }else if(s.at(0) == s.at(2) && s.at(2) == s.at(1)){
      |              ^~
a.cc:10:25: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |   }else if(s.at(0) == s.at(2) && s.at(2) == s.at(1)){
      |                         ^~
a.cc:10:36: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |   }else if(s.at(0) == s.at(2) && s.at(2) == s.at(1)){
      |                                    ^~
a.cc:10:47: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |   }else if(s.at(0) == s.at(2) && s.at(2) == s.at(1)){
      |                                               ^~
a.cc:12:14: error: request for member 'at' in 's', which is of non-class type 'int'
   12 |   }else if(s.at(1) == s.at(2) && s.at(2) == s.at(3)){
      |              ^~
a.cc:12:25: error: request for member 'at' in 's', which is of non-class type 'int'
   12 |   }else if(s.at(1) == s.at(2) && s.at(2) == s.at(3)){
      |                         ^~
a.cc:12:36: error: request for member 'at' in 's', which is of non-class type 'int'
   12 |   }else if(s.at(1) == s.at(2) && s.at(2) == s.at(3)){
      |                                    ^~
a.cc:12:47: error: request for member 'at' in 's', which is of non-class type 'int'
   12 |   }else if(s.at(1) == s.at(2) && s.at(2) == s.at(3)){
      |                                               ^~