Language: C++

#include <iostream>
#include <string>

#define el endl
#define fd fixed

using namespace std;

class Dice
{
private:
  int top;
  int face;
  int right;
  int left;
  int back;
  int bottom;
public:
  void setTop(int a);
  void setFace(int a);
  void setRight(int a);
  void setLeft(int a);
  void setBack(int a);
  void setBottom(int a);
  int getTop();
  int getFace();
  int getRight();
  int getLeft();
  int getBack();
  int getBottom();
  void roll(string s);
  void rollE();
  void rollN();
  void rollS();
  void rollW();
  void arrangeTop(int a);
  void arrangeFace(int a);
  bool checkDice(Dice d);
  bool checkDice(Dice d)
};

void Dice::setTop(int a) {
  top = a;
}

void Dice::setFace(int a) {
  face = a;
}

void Dice::setRight(int a) {
  right = a;
}

void Dice::setLeft(int a) {
  left = a;
}

void Dice::setBack(int a) {
  back = a;
}

void Dice::setBottom(int a) {
  bottom = a;
}

int Dice::getTop() {
  return top;
}

int Dice::getFace() {
  return face;
}

int Dice::getRight() {
  return right;
}

int Dice::getLeft() {
  return left;
}

int Dice::getBack() {
  return back;
}

int Dice::getBottom() {
  return bottom;
}

void Dice::roll(string s) {
  int n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] == 'E') rollE();
    if (s[i] == 'N') rollN();
    if (s[i] == 'S') rollS();
    if (s[i] == 'W') rollW();
  }
}

void Dice::rollE() {
  int tmp = top;
  top = left;
  left = bottom;
  bottom = right;
  right = tmp;
}

void Dice::rollN() {
  int tmp = top;
  top = face;
  face = bottom;
  bottom = back;
  back = tmp;
}

void Dice::rollS() {
  int tmp = top;
  top = back;
  back = bottom;
  bottom = face;
  face = tmp;
}

void Dice::rollW() {
  int tmp = top;
  top = right;
  right = bottom;
  bottom = left;
  left = tmp;
}

void Dice::arrangeTop(int a) {
  for (int i = 0; i < 3; i++) {
    if (top == a) break;
    roll("N");
    if (top == a) break;
    roll("E");
  }
}

void Dice::arrangeFace(int a) {
  for (int i = 0; i < 4; i++) {
    if (face == a) break;
    roll("NES");
  }
}

bool Dice::isDice() {
  d1.arrangeTop(d2.getTop());
  d1.arrangeFace(d2.getFace());
  if (d1.checkDice(d2))
    return true;
  d1.arrangeTop(d2.getFace());
  d1.arrangeFace(d2.getRight());
  if (d1.checkDice(d2))
  qreturn true;
  d1.arrangeTop(d2.getRight());
  d1.arrangeFace(d2.getBottom());
  if (d1.checkDice(d2))
    return true;
  d1.arrangeTop(d2.getBottom());
  d1.arrangeFace(d2.getBack());
  if (d1.checkDice(d2))
    return true;
  d1.arrangeTop(d2.getBack());
  d1.arrangeFace(d2.getLeft());
  if (d1.checkDice(d2))
    return = true;
  d1.arrangeTop(d2.getTop());
  d1.arrangeFace(d2.getFace());
  if (d1.checkDice(d2))
    return true;
}

bool Dice::checkDice(Dice d) {
  if (top != d.getTop() || face != d.getFace() || right != d.getRight() || left != d.getLeft() || back != d.getBack() || bottom != d.getBottom()) return false;
  return true;
}

int main() {
  Dice d1, d2;
  int a[6], b[6];
  cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> a[5] >> b[0] >> b[1] >> b[2] >> b[3] >> b[4] >> b[5];
  d1.setTop(a[0]);
  d1.setFace(a[1]);
  d1.setRight(a[2]);
  d1.setLeft(a[3]);
  d1.setBack(a[4]);
  d1.setBottom(a[5]);
  d2.setTop(b[0]);
  d2.setFace(b[1]);
  d2.setRight(b[2]);
  d2.setLeft(b[3]);
  d2.setBack(b[4]);
  d2.setBottom(b[5]);
  if (isDice) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc:39:24: error: expected ';' at end of member declaration
   39 |   bool checkDice(Dice d)
      |                        ^
      |                         ;
a.cc:39:8: error: 'bool Dice::checkDice(Dice)' cannot be overloaded with 'bool Dice::checkDice(Dice)'
   39 |   bool checkDice(Dice d)
      |        ^~~~~~~~~
a.cc:38:8: note: previous declaration 'bool Dice::checkDice(Dice)'
   38 |   bool checkDice(Dice d);
      |        ^~~~~~~~~
a.cc:148:6: error: no declaration matches 'bool Dice::isDice()'
  148 | bool Dice::isDice() {
      |      ^~~~
a.cc:148:6: note: no functions named 'bool Dice::isDice()'
a.cc:9:7: note: 'class Dice' defined here
    9 | class Dice
      |       ^~~~
a.cc: In function 'int main()':
a.cc:196:7: error: 'isDice' was not declared in this scope; did you mean 'Dice'?
  196 |   if (isDice) cout << "Yes" << endl;
      |       ^~~~~~
      |       Dice