Language: C++

#include<iostream>
using namespace std;

class Cube{
    public:
    int f[6];
    Cube(){}
    void roll_x(){roll(0,1,5,4);} // to E
    void roll_y(){roll(0,2,5,3);} // to N
    void roll_z(){roll(1,2,4,3);} // 上から見て時計回り
    void roll(int i,int j,int k,int l){
        int t=f[i]; f[i]=f[j]; f[j]=f[k]; f[k]=f[l]; f[l]=t;
    }
};

bool eq(Cube c1,Cube c2){
    for(int i=0;i<6;i++){
        if(c1.f[i]!=c2.f[i]) return false;
    }
    return true;
}

bool equal(Dice c1,Dice c2){
    for(int i=0;i<6;i++){
        for(int j=0;j<4;j++){
            if(eq(c1,c2)) return true;
            c1.roll_z();
        }
        if(i%2==0) c1.roll_y();
        else c1.roll_x();
    }
    return false;
}

int main(){
    Dice c1,c2;
    
    for(int i=0;i<6;i++) cin >> c1.f[i];
    for(int i=0;i<6;i++) cin >> c2.f[i];

    if(equal(c1,c2)) cout << "Yes" << endl;
    else cout << "No" << endl;
    
    return 0;
}


Compiler output:
a.cc:23:12: error: 'Dice' was not declared in this scope
   23 | bool equal(Dice c1,Dice c2){
      |            ^~~~
a.cc:23:20: error: 'Dice' was not declared in this scope
   23 | bool equal(Dice c1,Dice c2){
      |                    ^~~~
a.cc:23:27: error: expression list treated as compound expression in initializer [-fpermissive]
   23 | bool equal(Dice c1,Dice c2){
      |                           ^
a.cc: In function 'int main()':
a.cc:36:5: error: 'Dice' was not declared in this scope
   36 |     Dice c1,c2;
      |     ^~~~
a.cc:38:33: error: 'c1' was not declared in this scope
   38 |     for(int i=0;i<6;i++) cin >> c1.f[i];
      |                                 ^~
a.cc:39:33: error: 'c2' was not declared in this scope
   39 |     for(int i=0;i<6;i++) cin >> c2.f[i];
      |                                 ^~
a.cc:41:8: error: reference to 'equal' is ambiguous
   41 |     if(equal(c1,c2)) cout << "Yes" << endl;
      |        ^~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:1737:5: note: candidates are: 'template<class _IIter1, class _IIter2, class _BinaryPredicate> bool std::equal(_IIter1, _IIter1, _IIter2, _IIter2, _BinaryPredicate)'
 1737 |     equal(_IIter1 __first1, _IIter1 __last1,
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1704:5: note:                 'template<class _II1, class _II2> bool std::equal(_II1, _II1, _II2, _II2)'
 1704 |     equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1613:5: note:                 'template<class _IIter1, class _IIter2, class _BinaryPredicate> bool std::equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate)'
 1613 |     equal(_IIter1 __first1, _IIter1 __last1,
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1582:5: note:                 'template<class _II1, class _II2> bool std::equal(_II1, _II1, _II2)'
 1582 |     equal(_II1 __first1, _II1 __last1, _II2 __first2)
      |     ^~~~~
a.cc:23:6: note:                 'bool equal'
   23 | bool equal(Dice c1,Dice c2){
      |      ^~~~~
a.cc:41:14: error: 'c1' was not declared in this scope
   41 |     if(equal(c1,c2)) cout << "Yes" << endl;
      |              ^~
a.cc:41:17: error: 'c2' was not declared in this scope
   41 |     if(equal(c1,c2)) cout << "Yes" << endl;
      |                 ^~