Language: C++

#include<stdio.h>

struct SI{int top;int west;int south;int east;int north;int back;};

void E(struct SI);
void W(struct SI);
void S(struct SI);
void N(struct SI);


int main(){

struct SI P;
char q;

scanf("%d%d%d%d%d%d",&P.top, &P.west, &P.south, &P.east, &P.north, &P.back);
while(scanf("%c",&q)!=EOF){
if(q=='E')E(SI);
if(q=='N')N(SI);
if(q=='W')W(SI);
if(q=='S')S(SI);
}
printf("%d\n",SI.top);

retun 0;
}

void N(struct SI){
int t=SI.top;
SI.top=SI.south;SI.south=SI.back;SI.back=SI.north;SI.north=t;
}

void S(struct SI){
int t=SI.top;
SI.top=SI.north;SI.north=SI.back;SI.back=SI.south;SI.south=t;
}
void E(struct SI){
int t=SI.top;
SI.top=SI.west;SI.west=SI.back;SI.back=SI.east;SI.east=t;
}
void W(struct SI){
int t=SI.top;
SI.top=SI.east;SI.east=SI.back;SI.back=SI.west;SI.west=t;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: expected primary-expression before ')' token
   18 | if(q=='E')E(SI);
      |               ^
a.cc:19:15: error: expected primary-expression before ')' token
   19 | if(q=='N')N(SI);
      |               ^
a.cc:20:15: error: expected primary-expression before ')' token
   20 | if(q=='W')W(SI);
      |               ^
a.cc:21:15: error: expected primary-expression before ')' token
   21 | if(q=='S')S(SI);
      |               ^
a.cc:23:17: error: expected primary-expression before '.' token
   23 | printf("%d\n",SI.top);
      |                 ^
a.cc:25:1: error: 'retun' was not declared in this scope
   25 | retun 0;
      | ^~~~~
a.cc: In function 'void N(SI)':
a.cc:29:9: error: expected primary-expression before '.' token
   29 | int t=SI.top;
      |         ^
a.cc:30:3: error: expected unqualified-id before '.' token
   30 | SI.top=SI.south;SI.south=SI.back;SI.back=SI.north;SI.north=t;
      |   ^
a.cc:30:19: error: expected unqualified-id before '.' token
   30 | SI.top=SI.south;SI.south=SI.back;SI.back=SI.north;SI.north=t;
      |                   ^
a.cc:30:36: error: expected unqualified-id before '.' token
   30 | SI.top=SI.south;SI.south=SI.back;SI.back=SI.north;SI.north=t;
      |                                    ^
a.cc:30:53: error: expected unqualified-id before '.' token
   30 | SI.top=SI.south;SI.south=SI.back;SI.back=SI.north;SI.north=t;
      |                                                     ^
a.cc: In function 'void S(SI)':
a.cc:34:9: error: expected primary-expression before '.' token
   34 | int t=SI.top;
      |         ^
a.cc:35:3: error: expected unqualified-id before '.' token
   35 | SI.top=SI.north;SI.north=SI.back;SI.back=SI.south;SI.south=t;
      |   ^
a.cc:35:19: error: expected unqualified-id before '.' token
   35 | SI.top=SI.north;SI.north=SI.back;SI.back=SI.south;SI.south=t;
      |                   ^
a.cc:35:36: error: expected unqualified-id before '.' token
   35 | SI.top=SI.north;SI.north=SI.back;SI.back=SI.south;SI.south=t;
      |                                    ^
a.cc:35:53: error: expected unqualified-id before '.' token
   35 | SI.top=SI.north;SI.north=SI.back;SI.back=SI.south;SI.south=t;
      |                                                     ^
a.cc: In function 'void E(SI)':
a.cc:38:9: error: expected primary-expression before '.' token
   38 | int t=SI.top;
      |         ^
a.cc:39:3: error: expected unqualified-id before '.' token
   39 | SI.top=SI.west;SI.west=SI.back;SI.back=SI.east;SI.east=t;
      |   ^
a.cc:39:18: error: expected unqualified-id before '.' token
   39 | SI.top=SI.west;SI.west=SI.back;SI.back=SI.east;SI.east=t;
      |                  ^
a.cc:39:34: error: expected unqualified-id before '.' token
   39 | SI.top=SI.west;SI.west=SI.back;SI.back=SI.east;SI.east=t;
      |                                  ^
a.cc:39:50: error: expected unqualified-id before '.' token
   39 | SI.top=SI.west;SI.west=SI.back;SI.back=SI.east;SI.east=t;
      |                                                  ^
a.cc: In function 'void W(SI)':
a.cc:42:9: error: expected primary-expression before '.' token
   42 | int t=SI.top;
      |         ^
a.cc:43:3: error: expected unqualified-id before '.' token
   43 | SI.top=SI.east;SI.east=SI.back;SI.back=SI.west;SI.west=t;
      |   ^
a.cc:43:18: error: expected unqualified-id before '.' token
   43 | SI.top=SI.east;SI.east=SI.back;SI.back=SI.west;SI.west=t;
      |                  ^
a.cc:43:34: error: expected unqualified-id before '.' token
   43 | SI.top=SI.east;SI.east=SI.back;SI.back=SI.west;SI.west=t;
      |                                  ^
a.cc:43:50: error: expected unqualified-id before '.' token
   43 | SI.top=SI.east;SI.east=SI.back;SI.back=SI.west;SI.west=t;
      |                                                  ^