Language: C++

#include <iostream>
#include <vector>
using namespace std;

class Dice{
public:
    long r[6];
    Dice();
    void roll(long r[]){
        swap(this.r[s[0]], this.r[s[1]]);
        swap(this.r[s[1]], this.r[s[2]]);
        swap(this.r[s[2]], this.r[s[3]]);
    }
    void spin(char c);
};

void Dice::spin(char c){
    if (c == 'W') Dice::rotate(n, 0, 2, 5, 3);
    else Dice::rotate(n, 0, 1, 5, 4);
}


void rotate(long n, long a, long b, long c, long d){
    swap(D[n][a], D[n][b]); swap(D[n][b], D[n][c]); swap(D[n][c], D[n][d]);
}

void spin(long n, char c){
    if (c=='W') rotate(n, 0, 2, 5, 3);
    else rotate(n, 0, 1, 5, 4);
}

int main() {
    int ans = 0;
    int n;
    cin >> n;
    vector<Dice> D(n);
    for (int i = 0; i < n ; i++) {
        for (int j = 0; j < 6; j++){
            cin >> d[i].r[j];
        }
    }
    for (int i = 0; i < n ; i++) {
        for (int j = i + 1 ; j <= n ; j++) {
            char SWS[8]={"NNNWNNN"};
            for (int k = 0; k < 8; k++){
                if (D[i].r[1] == D[j].r[1]) break;
                D[j].spin(SWS[k]);
            }
            for (int k = 0; k < 4; k++){
                if (D[i].r[0] == D[j].r[0]){
                    if (D[i].r[1] == D[j].r[1] && D[i].r[2] == D[j].r[2] && D[i].r[3]==D[j].r[3] && D[i].r[4] == D[j].r[4] && D[i].r[5] == D[j].r[5])
                        ans++;
                }
                D[j].spin('W');
            }
        }
    }

    if (ans == 0) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Compiler output:
a.cc: In member function 'void Dice::roll(long int*)':
a.cc:10:19: error: request for member 'r' in '(Dice*)this', which is of pointer type 'Dice*' (maybe you meant to use '->' ?)
   10 |         swap(this.r[s[0]], this.r[s[1]]);
      |                   ^
a.cc:10:21: error: 's' was not declared in this scope
   10 |         swap(this.r[s[0]], this.r[s[1]]);
      |                     ^
a.cc:10:33: error: request for member 'r' in '(Dice*)this', which is of pointer type 'Dice*' (maybe you meant to use '->' ?)
   10 |         swap(this.r[s[0]], this.r[s[1]]);
      |                                 ^
a.cc:11:19: error: request for member 'r' in '(Dice*)this', which is of pointer type 'Dice*' (maybe you meant to use '->' ?)
   11 |         swap(this.r[s[1]], this.r[s[2]]);
      |                   ^
a.cc:11:33: error: request for member 'r' in '(Dice*)this', which is of pointer type 'Dice*' (maybe you meant to use '->' ?)
   11 |         swap(this.r[s[1]], this.r[s[2]]);
      |                                 ^
a.cc:12:19: error: request for member 'r' in '(Dice*)this', which is of pointer type 'Dice*' (maybe you meant to use '->' ?)
   12 |         swap(this.r[s[2]], this.r[s[3]]);
      |                   ^
a.cc:12:33: error: request for member 'r' in '(Dice*)this', which is of pointer type 'Dice*' (maybe you meant to use '->' ?)
   12 |         swap(this.r[s[2]], this.r[s[3]]);
      |                                 ^
a.cc: In member function 'void Dice::spin(char)':
a.cc:18:25: error: 'rotate' is not a member of 'Dice'
   18 |     if (c == 'W') Dice::rotate(n, 0, 2, 5, 3);
      |                         ^~~~~~
a.cc:18:32: error: 'n' was not declared in this scope
   18 |     if (c == 'W') Dice::rotate(n, 0, 2, 5, 3);
      |                                ^
a.cc:19:16: error: 'rotate' is not a member of 'Dice'
   19 |     else Dice::rotate(n, 0, 1, 5, 4);
      |                ^~~~~~
a.cc:19:23: error: 'n' was not declared in this scope
   19 |     else Dice::rotate(n, 0, 1, 5, 4);
      |                       ^
a.cc: In function 'void rotate(long int, long int, long int, long int, long int)':
a.cc:24:10: error: 'D' was not declared in this scope
   24 |     swap(D[n][a], D[n][b]); swap(D[n][b], D[n][c]); swap(D[n][c], D[n][d]);
      |          ^
a.cc: In function 'int main()':
a.cc:39:20: error: 'd' was not declared in this scope
   39 |             cin >> d[i].r[j];
      |                    ^