Language: C++

#include <iostream>
#include <cstdlib>
#include <ctime>

using namespace std;

class Dice {
      private:
              int value[6];
  
      public:             
              Dice(int value[]) {             
                   for (int i = 0; i < 6; i++) {
                        this->value[i] = value[i];
                   }                  
              }
              
              void swap(int& a, int& b) {
                   int temp = a;
                   a = b;
                   b = temp;
              }

              void move_N(int value[]) {
                   this->swap(value[0], value[1]);
                   this->swap(value[1], value[5]);
                   this->swap(value[5], value[4]);
              }

              void move_E(int value[]) {
                   this->swap(value[0], value[3]);
                   this->swap(value[3], value[5]);
                   this->swap(value[5], value[2]);
              }

              void move_W(int value[]) {
                   this->swap(value[0], value[2]);
                   this->swap(value[2], value[5]);
                   this->swap(value[5], value[3]);
              }

              void move_S(int value[]) {
                   this->swap(value[0], value[4]);
                   this->swap(value[4], value[5]);
                   this->swap(value[5], value[1]);
              }      

              int Get_value(int i) {
                  return (this->value[i]);
              }                      
};

int same_side(Dice dice1, Dice dice2, int value[]);

int main()
{
    long i, j;
    int  value[2][6];  
    
    for (i = 0; i < 2; i++) {
         for (j = 0; j < 6; j++) {
              do {
                  cin >> value[i][j];
              } while (value[i][j] < 0 || value[i][j] > 100);
         }
    }

    Dice dice1(value[0]);
    Dice dice2(value[1]);

    while (1) {
           srand(time(NULL));

           if (rand() % 4 == 0) {
               dice2.move_N(value[1]);
           } else if (rand() % 4 == 1) {
               dice2.move_E(value[1]);
           } else if (rand() % 4 == 2) {
               dice2.move_W(value[1]);
           } else if (rand() % 4 == 3) {
               dice2.move_S(value[1]);
           }       

           if (dice1.Get_value(0) == dice2.Get_value(0)) {
               break;
           }  
    }
    
    if (same_side(dice1, dice2, value[1]) == 1) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
  
    return (0);
}

int same_side(Dice dice1, Dice dice2, int value[])
{
    int i;
 
    if (dice1.Get_value(1) != dice2.Get_value(1)) {
        dice2.move_S(value[]);
        dice2.move_E(value[]);
        dice2.move_N(value[]);
    }

    for (i = 2; i < 4; i++) {
         if (dice1.Get_value(i) != dice2.Get_value(i)) {
             break;
         }
    }

    if (i == 5) {
        return (1);
    } else {
        return (0);
    }
}
    

Compiler output:
a.cc: In function 'int same_side(Dice, Dice, int*)':
a.cc:103:28: error: expected primary-expression before ']' token
  103 |         dice2.move_S(value[]);
      |                            ^
a.cc:104:28: error: expected primary-expression before ']' token
  104 |         dice2.move_E(value[]);
      |                            ^
a.cc:105:28: error: expected primary-expression before ']' token
  105 |         dice2.move_N(value[]);
      |                            ^