Language: C++

	  break;
	case 'S':
	  SwapFour(num[0],num[1],num[5],num[4]);
	  break;
	case 'W':
	  SwapFour(num[0],num[3],num[5],num[2]);
	  break;
	case 'N':
	  SwapFour(num[0],num[4],num[5],num[1]);
	  break;
      }
    };
    int DicePutTop(){
      return num[0];
    }
    int DicePutX(int x){
      return num[x];
    }
  private:
    // a->b->c->d->a
    void SwapFour(int &a, int &b, int &c, int &d){
      a ^= b; b ^= a; a ^= b;
      a ^= c; c ^= a; a ^= c;
      a ^= d; d ^= a; a ^= d;
    }
};

int main(){
  Dice dice;
  int arr[6];
  bool flg = false;
  
  for(int i=0;i<6;i++){
    int x;
    cin >> x;
    dice.DiceSet(i, x);
  }
  for(int i=0;i<6;i++){
    cin >> arr[i];
  }

  if(dice.DicePutX(2) == arr[0]) dice.DiceRoll('W');
  if(dice.DicePutX(3) == arr[0]) dice.DiceRoll('E');
  for(int i=0;i<3;i++){
    dice.DiceRoll('N');
    if(dice.DicePutX(0) == arr[0]){
      for(int j=0;j<3;j++){
        dice.DiceRoll('E'); dice.DiceRoll('N'); dice.DiceRoll('W');
	if(dice.DicePutX(1) == arr[1]){
	  for(int k=0;k<6;k++){
	    if(dice.DicePutX(k) != arr[k]){
              cout << "No" << endl;
	      return 0;
	    }
	  }
	  cout << "Yes" << endl;
	  return 0;
	}
      }
    }
  }
  cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc:1:11: error: expected unqualified-id before 'break'
    1 |           break;
      |           ^~~~~
a.cc:2:9: error: expected unqualified-id before 'case'
    2 |         case 'S':
      |         ^~~~
a.cc:4:11: error: expected unqualified-id before 'break'
    4 |           break;
      |           ^~~~~
a.cc:5:9: error: expected unqualified-id before 'case'
    5 |         case 'W':
      |         ^~~~
a.cc:7:11: error: expected unqualified-id before 'break'
    7 |           break;
      |           ^~~~~
a.cc:8:9: error: expected unqualified-id before 'case'
    8 |         case 'N':
      |         ^~~~
a.cc:10:11: error: expected unqualified-id before 'break'
   10 |           break;
      |           ^~~~~
a.cc:11:7: error: expected declaration before '}' token
   11 |       }
      |       ^
a.cc:12:5: error: expected declaration before '}' token
   12 |     };
      |     ^
a.cc: In function 'int DicePutTop()':
a.cc:14:14: error: 'num' was not declared in this scope; did you mean 'enum'?
   14 |       return num[0];
      |              ^~~
      |              enum
a.cc: In function 'int DicePutX(int)':
a.cc:17:14: error: 'num' was not declared in this scope; did you mean 'enum'?
   17 |       return num[x];
      |              ^~~
      |              enum
a.cc: At global scope:
a.cc:19:3: error: expected unqualified-id before 'private'
   19 |   private:
      |   ^~~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | };
      | ^
a.cc: In function 'int main()':
a.cc:29:3: error: 'Dice' was not declared in this scope
   29 |   Dice dice;
      |   ^~~~
a.cc:35:5: error: 'cin' was not declared in this scope
   35 |     cin >> x;
      |     ^~~
a.cc:36:5: error: 'dice' was not declared in this scope
   36 |     dice.DiceSet(i, x);
      |     ^~~~
a.cc:39:5: error: 'cin' was not declared in this scope
   39 |     cin >> arr[i];
      |     ^~~
a.cc:42:6: error: 'dice' was not declared in this scope
   42 |   if(dice.DicePutX(2) == arr[0]) dice.DiceRoll('W');
      |      ^~~~
a.cc:43:6: error: 'dice' was not declared in this scope
   43 |   if(dice.DicePutX(3) == arr[0]) dice.DiceRoll('E');
      |      ^~~~
a.cc:45:5: error: 'dice' was not declared in this scope
   45 |     dice.DiceRoll('N');
      |     ^~~~
a.cc:52:15: error: 'cout' was not declared in this scope
   52 |               cout << "No" << endl;
      |               ^~~~
a.cc:52:31: error: 'endl' was not declared in this scope
   52 |               cout << "No" << endl;
      |                               ^~~~
a.cc:56:11: error: 'cout' was not declared in this scope
   56 |           cout << "Yes" << endl;
      |           ^~~~
a.cc:56:28: error: 'endl' was not declared in this scope
   56 |           cout << "Yes" << endl;
      |                            ^~~~
a.cc:62:3: error: 'cout' was not declared in this scope
   62 |   cout << "No" << endl;
      |   ^~~~
a.cc:62:19: error: 'endl' was not declared in this scope
   62 |   cout << "No" << endl;
      |                   ^~~~