Language: C++

#include<iostream>
using namespace std;

class Cube{
public:
int f[6];
Cube(){}
void roll_z(){roll(1,2,4,3)}
void roll_y(){roll(0,2,5,3)}
void roll_x(){roll(0,1,5,4)}
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;
}
void move(char ch){
if(ch=='E') for(int i=0;i<3;i++)roll_y;
if(ch=='W') roll_y;
if(ch=='N') roll_x;
if(ch=='S') for(int i=0;i<3;i++) roll_x;
}
};

int main(){
Cube c;
string com;
for(int i=0;i<6;i++)cin >>c.f[i];
cin >>com;
for(int i=0; i<com.size();i++)c.move(com[i]);
cout << c.f[0] <<endl;
return 0;
}
Compile Error Logs:
code.cpp:5:7: error: expected ???:??? before ???;??? token 
public; 
^ 
code.cpp: In member function ???void Cube::roll_z()???: 
code.cpp:8:28: error: expected ???;??? before ???}??? token 
void roll_z(){roll(1,2,4,3)} 
^ 
code.cpp: In member function ???void Cube::roll_y()???: 
code.cpp:9:28: error: expected ???;??? before ???}??? token 
void roll_y(){roll(0,2,5,3)} 
^ 
code.cpp: In member function ???void Cube::roll_x()???: 
code.cpp:10:28: error: expected ???;??? before ???}??? token 
void roll_x(){roll(0,1,5,4)} 
^ 
code.cpp: In member function ???void Cube::move(char)???: 
code.cpp:15:39: error: invalid use of non-static member function 
if(ch=='E') for(int i=0;i<3;i++)roll_y; 
^ 
code.cpp:16:19: error: invalid use of non-static member function 
if(ch=='W') roll_y; 

Compiler output:
a.cc: In member function 'void Cube::roll_z()':
a.cc:8:28: error: expected ';' before '}' token
    8 | void roll_z(){roll(1,2,4,3)}
      |                            ^
a.cc: In member function 'void Cube::roll_y()':
a.cc:9:28: error: expected ';' before '}' token
    9 | void roll_y(){roll(0,2,5,3)}
      |                            ^
a.cc: In member function 'void Cube::roll_x()':
a.cc:10:28: error: expected ';' before '}' token
   10 | void roll_x(){roll(0,1,5,4)}
      |                            ^
a.cc: In member function 'void Cube::move(char)':
a.cc:15:33: error: invalid use of non-static member function 'void Cube::roll_y()'
   15 | if(ch=='E') for(int i=0;i<3;i++)roll_y;
      |                                 ^~~~~~
a.cc:9:6: note: declared here
    9 | void roll_y(){roll(0,2,5,3)}
      |      ^~~~~~
a.cc:16:13: error: invalid use of non-static member function 'void Cube::roll_y()'
   16 | if(ch=='W') roll_y;
      |             ^~~~~~
a.cc:9:6: note: declared here
    9 | void roll_y(){roll(0,2,5,3)}
      |      ^~~~~~
a.cc:17:13: error: invalid use of non-static member function 'void Cube::roll_x()'
   17 | if(ch=='N') roll_x;
      |             ^~~~~~
a.cc:10:6: note: declared here
   10 | void roll_x(){roll(0,1,5,4)}
      |      ^~~~~~
a.cc:18:34: error: invalid use of non-static member function 'void Cube::roll_x()'
   18 | if(ch=='S') for(int i=0;i<3;i++) roll_x;
      |                                  ^~~~~~
a.cc:10:6: note: declared here
   10 | void roll_x(){roll(0,1,5,4)}
      |      ^~~~~~
a.cc: At global scope:
a.cc:31:1: error: 'Compile' does not name a type
   31 | Compile Error Logs:
      | ^~~~~~~
a.cc:32:50: error: expected unqualified-id before '?' token
   32 | code.cpp:5:7: error: expected ???:??? before ???;??? token
      |                                                  ^
a.cc:34:1: error: expected unqualified-id before '^' token
   34 | ^
      | ^
a.cc:36:36: error: expected unqualified-id before '?' token
   36 | code.cpp:8:28: error: expected ???;??? before ???}??? token
      |                                    ^
a.cc:36:50: error: expected declaration before '}' token
   36 | code.cpp:8:28: error: expected ???;??? before ???}??? token
      |                                                  ^
a.cc:36:51: error: expected unqualified-id before '?' token
   36 | code.cpp:8:28: error: expected ???;??? before ???}??? token
      |                                                   ^
a.cc:38:1: error: expected unqualified-id before '^' token
   38 | ^
      | ^
a.cc:40:36: error: expected unqualified-id before '?' token
   40 | code.cpp:9:28: error: expected ???;??? before ???}??? token
      |                                    ^
a.cc:40:50: error: expected declaration before '}' token
   40 | code.cpp:9:28: error: expected ???;??? before ???}??? token
      |                                                  ^
a.cc:40:51: error: expected unqualified-id before '?' token
   40 | code.cpp:9:28: error: expected ???;??? before ???}??? token
      |                                                   ^
a.cc:42:1: error: expected unqualified-id before '^' token
   42 | ^
      | ^
a.cc:44:37: error: expected unqualified-id before '?' token
   44 | code.cpp:10:28: error: expected ???;??? before ???}??? token
      |                                     ^
a.cc:44:51: error: expected declaration before '}' token
   44 | code.cpp:10:28: error: expected ???;??? before ???}??? token
      |                                                   ^
a.cc:44:52: error: expected unqualified-id before '?' token
   44 | code.cpp:10:28: error: expected ???;??? before ???}??? token
      |                                                    ^
a.cc:46:1: error: expected unqualified-id before '^' token
   46 | ^
      | ^
a.cc:49:25: error: 'i' does not name a type
   49 | if(ch=='E') for(int i=0;i<3;i++)roll_y;
      |                         ^
a.cc:49:29: error: 'i' does not name a type
   49 | if(ch=='E') for(int i=0;i<3;i++)roll_y;
      |                             ^
a.cc:50:1: error: expected unqualified-id before '^' token
   50 | ^
      | ^