criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

// http://www.prefield.com/algorithm/misc/dice.html
enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT };
class dice {
public:
	dice(int top,int front,int right,int left,int back,int bottom) {
		id[TOP] = top; id[FRONT] = front; id[RIGHT] = right;
		id[LEFT] = left; id[BACK] = back; id[BOTTOM] = bottom;
	}
	int& operator[] (FACE f) { return id[f]; }
	const int& operator[] (FACE f) const { return id[f]; }
	bool operator==(const dice &b) const {
		const dice &a = *this;
		return a[TOP] == b[TOP] && a[BOTTOM] == b[BOTTOM] &&
			a[FRONT] == b[FRONT] && a[BACK] == b[BACK] &&
			 a[LEFT] == b[LEFT] && a[RIGHT] == b[RIGHT];
	}
	void roll_north() { roll(TOP, FRONT, BOTTOM, BACK); }
	void roll_south() { roll(TOP, BACK, BOTTOM, FRONT); }
	void roll_east() { roll(TOP, LEFT, BOTTOM, RIGHT); }
	void roll_west() { roll(TOP, RIGHT, BOTTOM, LEFT); }
	void roll_right() { roll(FRONT, LEFT, BACK, RIGHT); }
	void roll_left() { roll(FRONT, RIGHT, BACK, LEFT); }
	vector<dice> all_rolls(){
		vector<dice> ret;
		for (int k = 0; k < 6; (k&1?roll_east():roll_north()),++k)
			for (int i = 0; i < 4; roll_right(), ++i)
				ret.push_back(*this);
		return ret;
	}
	bool equivalent_to(const dice& di){
		for (int k = 0; k < 6; (k&1?roll_east():roll_north()),++k)
			for (int i = 0; i < 4; roll_right(), ++i)
				if (*this == di) return true;
		return false;
	}
private:
	void roll(FACE a, FACE b, FACE c, FACE d){
		int tmp = id[a];
		id[a] = id[b]; id[b] = id[c];
		id[c] = id[d]; id[d] = tmp;
	}
	int id[6];
};

int main(){
	int d[6];
	for(int i=0;i<6;i++)cin>>d[i];
	dice di(d[0],d[1],d[2],d[3],d[4],d[5]);
	string line;
	cin>>line;
	for(int i=0;i<line.size();i++){
		if(line[i]=='N')di.roll_north();
		if(line[i]=='E')di.roll_east();
		if(line[i]=='W')di.roll_west();
		if(line[i]=='S')di.roll_south();
	}
	cout<<di[TOP]<<endl;
}

Compiler output:
a.cc:27:9: error: 'vector' does not name a type
   27 |         vector<dice> all_rolls(){
      |         ^~~~~~
Language: C++

#include <iostream>

using namespace std;

    class Dice {
        int face[6];
      public
        int top;
        void East() {
            top = face[0];
            face[0] = face[3];
            face[3] = face[5];
            face[5] = face[2];
            face[2] = top;
        }
        void West() {
            top = face[0];
            face[0] = face[2];
            face[2] = face[5];
            face[5] = face[3];
            face[3] = top;
        }
        void North() {
            top = face[0];
            face[0] = face[1];
            face[1] = face[5];
            face[5] = face[4];
            face[4] = top;
        }
        void South() {
            top = face[0];
            face[0] = face[4];
            face[4] = face[5];
            face[5] = face[3];
            face[3] = top;
        }
    }    

    int main() {
        char o;
        Dice dice;
        for(i=0;i<6;i++)
            cin >> dice.face[i];
        while(cin >> o){
            switch(o) {
                case 'E': 
                    dice.East();
                    break;
                case 'W':
                    dice.West();
                    break;
                case 'N':
                    dice.North();
                    break;
                case 'S':
                    dice.South();
                    break;
            }
        }
    cout << dice.top << endl;
    }



     

Compiler output:
a.cc:7:13: error: expected ':' before 'int'
    7 |       public
      |             ^
      |             :
    8 |         int top;
      |         ~~~  
a.cc:37:6: error: expected ';' after class definition
   37 |     }
      |      ^
      |      ;
a.cc: In function 'int main()':
a.cc:42:13: error: 'i' was not declared in this scope
   42 |         for(i=0;i<6;i++)
      |             ^
a.cc:43:25: error: 'int Dice::face [6]' is private within this context
   43 |             cin >> dice.face[i];
      |                         ^~~~
a.cc:6:13: note: declared private here
    6 |         int face[6];
      |             ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <map>
#include <utility>

using namespace std;


class DICE
{
private:
	void swapMap(string a, string b);
public:
	map<string,int> dice;
	DICE(vector<int> &v);
	~DICE();
	void turnDice(char c);
	void printDice();
};

DICE::DICE(vector<int> &v){
	dice["top"] = v[0];
	dice["front"] = v[1];
	dice["right"] = v[2];
	dice["left"] = v[3];
	dice["back"] = v[4];
	dice["bottom"] = v[5];
}

void DICE::swapMap(string a, string b){
	if(dice.end() == dice.find(a) || dice.end() == dice.find(b)) return;
	int tmp;
	tmp = dice[a];
	dice[a] = dice[b];
	dice[b] = tmp;
}

void DICE::turnDice(char c){
	switch(c){
		case 'N':
			swapMap("top","back");
			swapMap("top","bottom");
			swapMap("top","front");
			break;
		case 'E':
			swapMap("top","right");
			swapMap("top","bottom");
			swapMap("top","left");
			break;
		case 'S':
			swapMap("top","front");
			swapMap("top","bottom");
			swapMap("top","back");
			break;
		case 'W':
			swapMap("top","left");
			swapMap("top","bottom");
			swapMap("top","right");
			break;
		default :
			break;
	}
}

void DICE::printDice(){
	cout << dice["top"] << endl;
}

int main(){
	vector<int> v;
	string cmd;
	for(int i = 0; i < 6; i++){
		int tmp;
		cin >> tmp;
		v.push_back(tmp);
	}
	cin >> cmd;

	DICE data(v);
	for(int i = 0; i < cmd.size(); i++)
		data.turnDice(cmd[i]);
	data.printDice();
}

Compiler output:
/usr/bin/ld: /tmp/ccq0jJy6.o: in function `main':
a.cc:(.text+0x1411): undefined reference to `DICE::~DICE()'
/usr/bin/ld: a.cc:(.text+0x143f): undefined reference to `DICE::~DICE()'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <map>
#include <utility>

using namespace std;


class DICE
{
private:
	void swapMap(string a, string b);
public:
	map<string,int> dice;
	DICE(vector<int> &v);
	~DICE();
	void turnDice(char c);
	void printDice();
};

DICE::DICE(vector<int> &v){
	dice["top"] = v[0];
	dice["front"] = v[1];
	dice["right"] = v[2];
	dice["left"] = v[3];
	dice["back"] = v[4];
	dice["bottom"] = v[5];
}

void DICE::swapMap(string a, string b){
	if(dice.end() == dice.find(a) || dice.end() == dice.find(b)) return;
	int tmp;
	tmp = dice[a];
	dice[a] = dice[b];
	dice[b] = tmp;
}

void DICE::turnDice(char c){
	switch(c){
		case 'N':
			swapMap("top","back");
			swapMap("top","bottom");
			swapMap("top","front");
			break;
		case 'E':
			swapMap("top","right");
			swapMap("top","bottom");
			swapMap("top","left");
			break;
		case 'S':
			swapMap("top","front");
			swapMap("top","bottom");
			swapMap("top","back");
			break;
		case 'W':
			swapMap("top","left");
			swapMap("top","bottom");
			swapMap("top","right");
			break;
		default :
			break;
	}
}

void DICE::printDice(){
	cout << dice["top"] << endl;
}

int main(){
	vector<int> v;
	string cmd;
	for(int i = 0; i < 6; i++){
		int tmp;
		cin >> tmp;
		v.push_back(tmp);
	}
	cin >> cmd;

	DICE data(v);
	for(int i = 0; i < cmd.size(); i++)
		data.turnDice(cmd[i]);
	data.printDice();
}

Compiler output:
/usr/bin/ld: /tmp/ccnnYIL6.o: in function `main':
a.cc:(.text+0x1411): undefined reference to `DICE::~DICE()'
/usr/bin/ld: a.cc:(.text+0x143f): undefined reference to `DICE::~DICE()'
collect2: error: ld returned 1 exit status
Language: C++

#include<vector>
#include<iostream>
using namespace std;
template <class data_t>
class dice{
public:
	vector<data_t> field;
	dice(vector<data_t> v);
	void roll(char ch);
	data_t top(){return field[0];}
};
template <class data_t>
dice<data_t>::dice(vector<data_t> v){
	vector<data_t>::iterator vi = v.begin();
	while(vi!=v.end()){
		field.push_back(*vi);
		vi++;
	}
}
template <class data_t>
void dice<data_t>::roll(char ch){
	data_t tmp;
	switch(ch){
		case 'E':
			tmp = field[0];
			field[0] = field[3];
			field[3] = field[5];
			field[5] = field[2];
			field[2] = tmp;
			break;
		case 'N':
			tmp = field[0];
			field[0] = field[1];
			field[1] = field[5];
			field[5] = field[4];
			field[4] = tmp;
			break;
		case 'S':
			tmp = field[0];
			field[0] = field[4];
			field[4] = field[5];
			field[5] = field[1];
			field[1] = tmp;
			break;
		case 'W':
			tmp = field[0];
			field[0] = field[2];
			field[2] = field[5];
			field[5] = field[3];
			field[3] = tmp;
			break;
	}
	return;
}

int main(){
	vector<int> v(6);
	string str;
	string::iterator si;
	cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4]>> v[5];
	cin >> str;
	dice<int> d(v);
	si = str.begin();
	while(si != str.end()){
		d.roll(*si);
		si++;
	}
	cout << d.top() << endl;
	return 0;
}

Compiler output:
a.cc: In constructor 'dice<data_t>::dice(std::vector<data_t>)':
a.cc:14:9: error: need 'typename' before 'std::vector<data_t>::iterator' because 'std::vector<data_t>' is a dependent scope
   14 |         vector<data_t>::iterator vi = v.begin();
      |         ^~~~~~~~~~~~~~
a.cc:14:33: error: expected ';' before 'vi'
   14 |         vector<data_t>::iterator vi = v.begin();
      |                                 ^~~
      |                                 ;
a.cc:15:15: error: 'vi' was not declared in this scope; did you mean 'v'?
   15 |         while(vi!=v.end()){
      |               ^~
      |               v
a.cc: In instantiation of 'dice<data_t>::dice(std::vector<data_t>) [with data_t = int]':
a.cc:62:15:   required from here
   62 |         dice<int> d(v);
      |                      ^
a.cc:14:25: error: dependent-name 'std::vector<data_t>::iterator' is parsed as a non-type, but instantiation yields a type
   14 |         vector<data_t>::iterator vi = v.begin();
      |                         ^~~~~~~~
a.cc:14:25: note: say 'typename std::vector<data_t>::iterator' if a type is meant
Language: C++

#include<stdio.h>

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

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


int main(){

struct SI P;
char q;

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


}
printf("%d\n",P.top);

return 0;
}

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

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

Compiler output:
a.cc:6:10: error: expected unqualified-id before 'struct'
    6 | struct W(struct SI);
      |          ^~~~~~
a.cc:6:10: error: expected ')' before 'struct'
    6 | struct W(struct SI);
      |         ~^~~~~~
      |          )
a.cc: In function 'int main()':
a.cc:20:16: error: invalid use of incomplete type 'struct W'
   20 | if(q=='W')P=W(P);
      |                ^
a.cc:6:8: note: forward declaration of 'struct W'
    6 | struct W(struct SI);
      |        ^
a.cc: At global scope:
a.cc:46:10: error: expected unqualified-id before 'struct'
   46 | struct W(struct SI P){
      |          ^~~~~~
a.cc:46:10: error: expected ')' before 'struct'
   46 | struct W(struct SI P){
      |         ~^~~~~~
      |          )
Language: C++

#include<stdio.h>

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

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


int main(){

struct SI P;
char q;

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


}
printf("%d\n",P.top);

return 0;
}

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

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

Compiler output:
a.cc:6:10: error: expected unqualified-id before 'struct'
    6 | struct W(struct SI);
      |          ^~~~~~
a.cc:6:10: error: expected ')' before 'struct'
    6 | struct W(struct SI);
      |         ~^~~~~~
      |          )
a.cc: In function 'int main()':
a.cc:20:16: error: invalid use of incomplete type 'struct W'
   20 | if(q=='W')P=W(P);
      |                ^
a.cc:6:8: note: forward declaration of 'struct W'
    6 | struct W(struct SI);
      |        ^
Language: C++

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>

struct dice
{
	int num[6];
};

int main()
{
	struct dice one;
	int i;
	for (i = 0; i < 6; i++)
	{
		scanf("%d", &one.num[i]);
	}
	char cmd[sizeof(cmd)];
	scanf("%s", cmd);
	for (i = 0; i < strlen(cmd); i++)
	{
		int tmp1, tmp2;
		switch (cmd[i])
		{
		case 'N':{tmp1 = one.num[0]; one.num[0] = one.num[1]; one.num[1] = one.num[5]; one.num[4] = tmp1; }break;
		case 'E':{tmp1 = one.num[0]; tmp2 = one.num[3]; one.num[0] = one.num[3]; one.num[2] = tmp1; one.num[3] = one.num[5]; one.num[5] = tmp2; }break;
		case 'W':{tmp1 = one.num[0]; tmp2 = one.num[3]; one.num[2] = one.num[5]; one.num[3] = tmp1; one.num[5] = tmp2; }break;
		case 'S':{tmp1 = one.num[0]; tmp2 = one.num[5]; one.num[0] = one.num[4]; one.num[5] = one.num[1]; one.num[1] = tmp1; one.num[4] = tmp2; }break;
		}
	}
	printf("%d\n", one.num[0]);
	printf("%d\n", strlen(cmd));

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: 'cmd' was not declared in this scope
   19 |         char cmd[sizeof(cmd)];
      |                         ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)

string or;
int ans;

class dice{
public:
	int n[6];
	void E(){
		int t = n[0];
		n[0] = n[3];
		n[3] = n[5];
		n[5] = n[2];
		n[2] = t;
	}
	void W(){
		int t = n[0];
		n[0] = n[2];
		n[2] = n[5];
		n[5] = n[3];
		n[3] = t;
	}
	void S(){
		int t = n[0];
		n[0] = n[4];
		n[4] = n[5];
		n[5] = n[1];
		n[1] = t;
	}
	void N(){
		int t = n[0];
		n[0] = n[1];
		n[1] = n[5];
		n[5] = n[4];
		n[4] = t;
	}
};


int main(){
	dice d;
	rep(i, 6) cin >> d.n[i];
	cin >> or;
	ans = d.n[0];
	rep(i, or.length()){
		switch (or[i])
		{
		case 'E':
			d.E();
			break;
		case 'W':
			d.W();
			break;
		case 'S':
			d.S();
			break;
		case 'N':
			d.N();
			break;
		default:
			break;
		}
	}
	cout << d.n[0] << endl;
	return 0;
}

Compiler output:
a.cc:8:8: error: expected unqualified-id before 'or' token
    8 | string or;
      |        ^~
a.cc: In function 'int main()':
a.cc:48:16: error: expected primary-expression before 'or' token
   48 |         cin >> or;
      |                ^~
a.cc:48:18: error: expected primary-expression before ';' token
   48 |         cin >> or;
      |                  ^
a.cc:50:16: error: expected primary-expression before 'or' token
   50 |         rep(i, or.length()){
      |                ^~
a.cc:6:32: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:50:18: error: expected primary-expression before '.' token
   50 |         rep(i, or.length()){
      |                  ^
a.cc:6:32: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:51:25: error: expected primary-expression before 'or' token
   51 |                 switch (or[i])
      |                         ^~
a.cc: In lambda function:
a.cc:51:30: error: expected '{' before ')' token
   51 |                 switch (or[i])
      |                              ^
Language: C++

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

class Dice {
    public:
        int a, b, c, d, z, f;
        Dice(int a, int b, int c, int d, int z, int f) {
            this->a = a;
            this->b = b;
            this->c = c;
            this->d = d;
            this->z = z;
            this->f = f;
        }

        void s() {
            int tmp = this->b;
            this->b = this->a;
            this->a = this->z;
            this->z = this->f;
            this->f = tmp;
        }

        void e() {
            int tmp = this->c;
            this->c = this->a;
            this->a = this->d;
            this->d = this->f;
            this->f = tmp;
        }

        void n() {
            int tmp = this->b;
            this->b = this->f;
            this->f = this->z;
            this->z = this->a;
            this->a = tmp;
        }

        void w() {
            int tmp = this->c;
            this->c = this->f;
            this->f = this->d;
            this->d = this->a;
            this->a = tmp;
        }

        void printTop() {
            cout << this->a << endl;
        }
};


int main () {
        int a,  b,  c,  d,  z,  f;
        cin >> a >>  b >>  c >>  d >>  z >>  f;
        Dice dd(a, b, c, d, z, f);
        char orders[100];
        scanf("%s", orders);
        for(int i=0; i<strlen(orders); i++) {
            if (orders[i] == 'S') {
                dd.s();
            }
            else if (orders[i] == 'E') {
                dd.e();
            }
            else if (orders[i] == 'W') {
                dd.w();
            }
            else if (orders[i] == 'N') {
                dd.n();
            }
        }
        dd.printTop();
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:24: error: 'strlen' was not declared in this scope
   61 |         for(int i=0; i<strlen(orders); i++) {
      |                        ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<string>
#include<map>

using namespace std;

class Dice{
	int face[6] ;
	map<string,int> dir;
	
public:
	Dice(int sai[6]){
		for(int i=0 ; i<6 ; i++){
			face[i] = sai[i] ;
		}
		dir["top"]    = 1 ;
		dir["south"]  = 2 ;
		dir["east"]   = 3 ;
		dir["west"]   = 4 ;
		dir["north"]  = 5 ;
		dir["bottom"] = 6 ;
	}
	void show(string d){
		if(d == "all"){
			for(int i=0 ; i<6 ; i++){
				cout << face[i] << " " ;
			}
			cout << endl;
			return ;
		}else{
			cout << face[dir[d]-1] << endl;
		}
	}
	int get(string d){
		return face[dir[d]-1] ;
	}
	void move(const string str){//動かす
		for(int i=0 ; i<str.size() ; i++){
			turn(str[i]);//char
		}
	}
	void turn(char d){//回す//direction:方向
		map<char, int> mp;
		mp['S'] = 0 ;
		mp['E'] = 1 ;
		mp['W'] = 2 ;
		mp['N'] = 3 ;
		
		static const int index[4][6] ={
			{5,1,3,4,6,2},//south
			{4,2,1,6,5,3},//east
			{3,2,6,1,5,4},//west
			{2,6,3,4,1,5},//north
		};
		
		int copy[6] ;
		for(int i=0 ; i<6 ; i++){
			copy[i] = face[i] ;
		}
		//これは止めて、代入演算子＝をオーバーライドしてもいいかもしれない。しかして、それをやると実行時のメモリが微増するはずだ。
		
		for(int i=0 ; i<6 ; i++){//permutation:置換
			face[i] = copy[index[mp[d]][i]-1] ;
		}
		
		//show("all");//check
	}
	void rotate(void){//回転//SWNの操作で、上から見てCCW:counter clock wise：反時計回りでの90度回転。
		turn('S');
		turn('W');
		turn('N');
	}
	bool adjust(int top,int south){//位置合わせ
		for(int i=0;i<6;i++){
			if(get("top") == top){
				break;
			}
			//cout << "zigzag:" << i << endl ;//check
			turn(i%2==0 ? 'S' : 'E');//三項演算子
		}
		for(int i=0;i<4;i++){
			//cout << "rotate:" << i << endl ;//check
			rotate();
			if(get("south") == south){
				return true ;
			}
		}
		
		return false ;
	}
	bool operator == (Dice obj){//演算子のオーバーライド
		if(obj.adjust(this->get("top"),this->get("south"))){
			for(int i=0 ; i<6 ; i++){
				if(this->face[i] != obj.face[i]){
					return false ;
				}
			}
			return true ;
		}
		
		return false ;
	}
};

int main(void){
	// ITP1_11_A　転がす
	int sai[6] ;
	cin >> sai[0] >> sai[1] >> sai[2] >> sai[3] >> sai[4] >> sai[5] ;
	Dice d(sai) ;
	
	strint str ;
	cin >> str ;
	
	d.move(str) ;
	d.show("top") ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:111:9: error: 'strint' was not declared in this scope; did you mean 'stdin'?
  111 |         strint str ;
      |         ^~~~~~
      |         stdin
a.cc:112:16: error: 'str' was not declared in this scope; did you mean 'std'?
  112 |         cin >> str ;
      |                ^~~
      |                std
Language: C++

#include <iostream>
#include <array>
#include <string>
#include "dice.h"



class dice
{
private:

    int n[6];
    int up = 1;        
    int north = 5;     
    int east = 3;     

public:

    dice(void)
    {
        for(int i = 0; i < 6; ++i) {
            this->n[i] = 0;
        }
    }

    void num_construct(int* a)
    {
        for(int i = 0; i < 6; ++i) {
            this->n[i] = a[i];
        }
    } 


    int get_up(void)
    {
        return this->n[up - 1];
    }

    void turn_n(void)
    {
        int tmpu = up;
        int tmpn = north;
        int tmpe = east;
        up = 7 - tmpn;
        north = tmpu;
        east = tmpe;
    }

    void turn_s(void)
    {
        int tmpu = up;
        int tmpn = north;
        int tmpe = east;
        up = tmpn;
        north = 7 - tmpu;
        east = tmpe;
    }

    void turn_e(void)
    {
        int tmpu = up;
        int tmpn = north;
        int tmpe = east;
        up = 7 - tmpe;
        north = tmpn;
        east = tmpu;
    }

    void turn_w(void)
    {
        int tmpu = up;
        int tmpn = north;
        int tmpe = east;
        up = tmpe;
        north = tmpn;
        east = 7 - tmpu;
    }

};

int main(void)
{
    dice dice1;
    int a[6];
    for (int i = 0; i < 6; ++i) {
        std::cin >> a[i];
    }
    dice1.num_construct(a);
    std::string treats;
    std::cin >> treats;
    for (unsigned int j = 0; j < treats.size(); ++j) {
        char treat = treats.at(j);
        if (treat == 'N') {
            dice1.turn_n();
        } else if (treat == 'S') {
            dice1.turn_s();
        } else if (treat == 'E') {
            dice1.turn_e();
        } else if (treat == 'W') {
            dice1.turn_w();
        }   
    }
    std::cout << dice1.get_up() << std::endl;
    return 0;
}

Compiler output:
a.cc:4:10: fatal error: dice.h: No such file or directory
    4 | #include "dice.h"
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <string>
#include <iostream>
int a[6], t; string s;
int main() {
	for(int i = 0; i < 6; i++) cin>> a[i];
	cin >> s;
	for(int i = 0; i < s.size(); i++) {
		t = a[0];
		switch(s[i]) {
		case 'N':
			a[0] = a[1];
			a[1] = a[5];
			a[5] = a[4];
			a[4] = t;
		case 'E':
			a[0] = a[3];
			a[3] = a[5];
			a[5] = a[2];
			a[2] = t;
		case 'S':
			a[0] = a[4];
			a[4] = a[5];
			a[5] = a[1];
			a[1] = t;
		case 'W':
			a[0] = a[2];
			a[2] = a[5];
			a[5] = a[3];
			a[3] = a[0];
		}
	}
	cout << a[0] << endl;
	return 0;
}

Compiler output:
a.cc:3:14: error: 'string' does not name a type; did you mean 'stdin'?
    3 | int a[6], t; string s;
      |              ^~~~~~
      |              stdin
a.cc: In function 'int main()':
a.cc:5:36: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         for(int i = 0; i < 6; i++) cin>> a[i];
      |                                    ^~~
      |                                    std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> s;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:16: error: 's' was not declared in this scope
    6 |         cin >> s;
      |                ^
a.cc:32:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   32 |         cout << a[0] << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:32:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   32 |         cout << a[0] << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

class Dice {
public:
    int label[6];

    Dice(int* nums) {
        for (int i = 0; i < 6; i++) label[i] = nums[i];
    }

    void printTop() {
        cout << label[0] << endl;
    }

    void roll(char direction) {
        int new_label[6];
        switch (direction) {
            case 'N':
                new_label[0] = label[1];
                new_label[1] = label[5];
                new_label[2] = label[2];
                new_label[3] = label[3];
                new_label[4] = label[0];
                new_label[5] = label[4];
                break;
            
            case 'S':
                new_label[0] = label[4];
                new_label[1] = label[0];
                new_label[2] = label[2];
                new_label[3] = label[3];
                new_label[4] = label[5];
                new_label[5] = label[1];
                break;
            
            case 'E':
                new_label[0] = label[3];
                new_label[1] = label[1];
                new_label[2] = label[0];
                new_label[3] = label[5];
                new_label[4] = label[4];
                new_label[5] = label[2];
                break;
            
            case 'W':
                new_label[0] = label[2];
                new_label[1] = label[1];
                new_label[2] = label[5];
                new_label[3] = label[0];
                new_label[4] = label[4];
                new_label[5] = label[3];
                break;

            default:
                new_label[0] = label[0];
                new_label[1] = label[1];
                new_label[2] = label[2];
                new_label[3] = label[3];
                new_label[4] = label[4];
                new_label[5] = label[5];
        }

        for (int i= 0; i < 6; i++) label[i] = new_label[i];
    }
};

int main(void) {
    int nums[6];
    for (int i = 0; i < 6; i++) cin >> nums[i];
    Dice dice(nums);

    string commands;
    cin >> commands;
    for (int i = 0; i < commands.size(); i++) dice.roll(commands[i]);
    dice.printTop;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:77:10: error: invalid use of non-static member function 'void Dice::printTop()'
   77 |     dice.printTop;
      |     ~~~~~^~~~~~~~
a.cc:13:10: note: declared here
   13 |     void printTop() {
      |          ^~~~~~~~
Language: C++

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

class Dice{
	public:
	int diceside[6];
	char instruct[100];
	
	void Show();
	void Move();
	};

	
void Dice::Show(){
    for(int i=0;i<6;i++){
        cout<<diceside[i]<<endl;
    }
}

void Dice::Move(){
	
	int d1=diceside[0];
	int d2=diceside[1];
	int d3=diceside[2];
	int d4=diceside[3];
	int d5=diceside[4];
	int d6=diceside[5];
	
	int x=d1;
	
	for(int i=0;instruct[i]!='\0';i++){
		switch(instruct[i]){
			case 'N':
			if(x==d1){x=d2;}
			else if(x==d2||d3||d4){x=d6;}
			else if(x==d5){x=d1;}
			else if(x==d6){x=d5;} 			break;
			
			case 'E':
			if(x==d3){x=d2;}
			else if(x==d1&||d2||d5||d6){x=d4;}
			else if(x==d4){x=d5;} 			break;
			
			case 'W':
			if(x==d3){x=d5;}
			else if(x==d1||d2||d5||d6){x=d3;}
			else if(x==d4){x=d2;} 			break;
			
			case 'S':
			if(x==d1){x=d5;}
			else if(x==d2||d3||d4){x=d1;}
			else if(x==d5){x=d6;}
			else if(x==d6){x=d2;} 			break;
    	}
	}
	
	cout<<x<<endl;
}


//-------------------------------------------------------------------

int main(void){
	
	int imput;
	Dice dice1;
	for(int i=0;i<6;i++){
		cin>>imput;
		dice1.diceside[i]=imput;
	}
	
	scanf("%s",dice1.instruct);
	
	dice1.Move();
	


	
}

Compiler output:
a.cc: In member function 'void Dice::Move()':
a.cc:42:39: error: expected primary-expression before '||' token
   42 |                         else if(x==d1&||d2||d5||d6){x=d4;}
      |                                       ^~
Language: C++

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

class Dice{
	public:
	int diceside[6];
	char instruct[100];
	
	void Move();
	};

	

void Dice::Move(){
	
	int d1=diceside[0];
	int d2=diceside[1];
	int d3=diceside[2];
	int d4=diceside[3];
	int d5=diceside[4];
	int d6=diceside[5];
	
	int x=d1;
	
	for(int i=0;instruct[i]!='\0';i++){
		switch(instruct[i]){
			case 'N':
			if(x==d1){x=d2;}
			else if(x==d2||d3||d4){x=d6;}
			else if(x==d5){x=d1;}
			else if(x==d6){x=d5;} 			break;
			
			case 'E':
			if(x==d3){x=d2;}
			else if(x==d1&||d2||d5||d6){x=d4;}
			else if(x==d4){x=d5;} 			break;
			
			case 'W':
			if(x==d3){x=d5;}
			else if(x==d1||d2||d5||d6){x=d3;}
			else if(x==d4){x=d2;} 			break;
			
			case 'S':
			if(x==d1){x=d5;}
			else if(x==d2||d3||d4){x=d1;}
			else if(x==d5){x=d6;}
			else if(x==d6){x=d2;} 			break;
    	}
	}
	
	cout<<x<<endl;
}


//-------------------------------------------------------------------

int main(void){
	
	int imput;
	Dice dice1;
	for(int i=0;i<6;i++){
		cin>>imput;
		dice1.diceside[i]=imput;
	}
	
	scanf("%s",dice1.instruct);
	
	dice1.Move();
	


	
}

Compiler output:
a.cc: In member function 'void Dice::Move()':
a.cc:36:39: error: expected primary-expression before '||' token
   36 |                         else if(x==d1&||d2||d5||d6){x=d4;}
      |                                       ^~
Language: C++

#include <iostream>
#include <iomanip>
#include <string>

namespace Simulation
{

class Dice
{
public:
    typedef struct DiceStruct{
        int top;
        int front;
        int right;
        int left;
        int back;
        int botom;

        //?????¢????????§???
        int current;
    };

    void set(int a, int b, int c, int d, int e, int f);
    void printTop();

    void TurnNorth();
    void TurnEast();
    void TurnSouth();
    void TurnWest();

private:
    DiceStruct m_dice{0,0,0,0,0,0,0};
}; //namespace Dice


std::unique_ptr<Dice> dice(new Dice());

} //namespace Simulation 

int main()
{
    using namespace Simulation;

    int a, b, c, d, e, f;
    std::cin >> a >> b >> c >> d >> e >> f;

    dice->set(a, b, c, d, e, f);


    std::string order = "";
    std::cin >> order;

    for (int i = 0; i < order.length(); i++) {
        if (order[i] == 'N') {
            dice->TurnNorth();
        }

        if (order[i] == 'S') {
            dice->TurnSouth();
        }

        if (order[i] == 'W') {
            dice->TurnWest();
        }

        if (order[i] == 'E') {
            dice->TurnEast();
        }
    }

    dice->printTop();

    return 0;
}

namespace Simulation
{

void Dice::set(int a, int b, int c, int d, int e, int f)
{
    m_dice.top = a;
    m_dice.front = b;
    m_dice.right = c;
    m_dice.left = d;
    m_dice.back = e;
    m_dice.botom = f;

}

void Dice::printTop()
{
    std::cout << m_dice.top << std::endl;
}

void Dice::TurnNorth()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.front;
    m_dice.front = m_dice.botom;
    m_dice.botom = m_dice.back;
    m_dice.botom = m_dice.back;
    m_dice.back = m_dice.current;
    m_dice.top = 0;
}

void Dice::TurnEast()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.left;
    m_dice.left = m_dice.botom;
    m_dice.botom = m_dice.right;
    m_dice.right = m_dice.current;
    m_dice.current = 0;
}

void Dice::TurnSouth()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.back;
    m_dice.back = m_dice.botom;
    m_dice.botom = m_dice.front;
    m_dice.front = m_dice.current;
    m_dice.current = 0;
}

void Dice::TurnWest()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.right;
    m_dice.right = m_dice.botom;
    m_dice.botom = m_dice.left;
    m_dice.left = m_dice.current;
    m_dice.current = 0;
}

}//namespace Simulation
~                                        

Compiler output:
a.cc:11:5: warning: 'typedef' was ignored in this declaration
   11 |     typedef struct DiceStruct{
      |     ^~~~~~~
a.cc:36:6: error: 'unique_ptr' in namespace 'std' does not name a template type
   36 | std::unique_ptr<Dice> dice(new Dice());
      |      ^~~~~~~~~~
a.cc:3:1: note: 'std::unique_ptr' is defined in header '<memory>'; this is probably fixable by adding '#include <memory>'
    2 | #include <iomanip>
  +++ |+#include <memory>
    3 | #include <string>
a.cc: In function 'int main()':
a.cc:47:5: error: 'dice' was not declared in this scope
   47 |     dice->set(a, b, c, d, e, f);
      |     ^~~~
a.cc: At global scope:
a.cc:137:2: error: expected class-name at end of input
  137 | ~
      |  ^
Language: C++

#include <iostream>
#include <iomanip>
#include <string>

namespace Simulation
{

class Dice
{
public:
    typedef struct DiceStruct{
        int top;
        int front;
        int right;
        int left;
        int back;
        int botom;

        //?????¢????????§???
        int current;
    };

    void set(int a, int b, int c, int d, int e, int f);
    void printTop();

    void TurnNorth();
    void TurnEast();
    void TurnSouth();
    void TurnWest();

private:
    DiceStruct m_dice{0,0,0,0,0,0,0};
}; //namespace Dice


std::unique_ptr<Dice> dice(new Dice());

} //namespace Simulation 

int main()
{
    using namespace Simulation;

    int a, b, c, d, e, f;
    std::cin >> a >> b >> c >> d >> e >> f;

    dice->set(a, b, c, d, e, f);


    std::string order = "";
    std::cin >> order;

    for (int i = 0; i < order.length(); i++) {
        if (order[i] == 'N') {
            dice->TurnNorth();
        }

        if (order[i] == 'S') {
            dice->TurnSouth();
        }

        if (order[i] == 'W') {
            dice->TurnWest();
        }

        if (order[i] == 'E') {
            dice->TurnEast();
        }
    }

    dice->printTop();

    return 0;
}

namespace Simulation
{

void Dice::set(int a, int b, int c, int d, int e, int f)
{
    m_dice.top = a;
    m_dice.front = b;
    m_dice.right = c;
    m_dice.left = d;
    m_dice.back = e;
    m_dice.botom = f;

}

void Dice::printTop()
{
    std::cout << m_dice.top << std::endl;
}

void Dice::TurnNorth()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.front;
    m_dice.front = m_dice.botom;
    m_dice.botom = m_dice.back;
    m_dice.botom = m_dice.back;
    m_dice.back = m_dice.current;
    m_dice.top = 0;
}

void Dice::TurnEast()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.left;
    m_dice.left = m_dice.botom;
    m_dice.botom = m_dice.right;
    m_dice.right = m_dice.current;
    m_dice.current = 0;
}

void Dice::TurnSouth()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.back;
    m_dice.back = m_dice.botom;
    m_dice.botom = m_dice.front;
    m_dice.front = m_dice.current;
    m_dice.current = 0;
}

void Dice::TurnWest()
{
    m_dice.current = m_dice.top;
    m_dice.top = m_dice.right;
    m_dice.right = m_dice.botom;
    m_dice.botom = m_dice.left;
    m_dice.left = m_dice.current;
    m_dice.current = 0;
}

}//namespace Simulation
                                     

Compiler output:
a.cc:11:5: warning: 'typedef' was ignored in this declaration
   11 |     typedef struct DiceStruct{
      |     ^~~~~~~
a.cc:36:6: error: 'unique_ptr' in namespace 'std' does not name a template type
   36 | std::unique_ptr<Dice> dice(new Dice());
      |      ^~~~~~~~~~
a.cc:3:1: note: 'std::unique_ptr' is defined in header '<memory>'; this is probably fixable by adding '#include <memory>'
    2 | #include <iomanip>
  +++ |+#include <memory>
    3 | #include <string>
a.cc: In function 'int main()':
a.cc:47:5: error: 'dice' was not declared in this scope
   47 |     dice->set(a, b, c, d, e, f);
      |     ^~~~
Language: C++

//ITP1_11_A
#include <bits/stdc++.h>
using namespace std;

class Dice{
public:
    Dice();
    int face[6] = {};
    int tmp[4] = {};
    void direction(char ch);
    void move(int a,int,b,int c,int d);
}
void Dice::direction(char ch){
    if(ch == 'N') move(0,1,5,4,);
    if(ch == 'S') move(0,4,5,1);
    if(ch == 'W') move(0,2,5,3);
    if(ch == 'E') move(0,3,5,2);
}

void Dice::move(int a,int b,int c,int d){
    tmp[0] = face[a];
    tmp[1] = face[b];
    tmp[2] = face[c];
    tmp[3] = face[d];

    face[d] = tmp[a];
    face[a] = tmp[b];
    face[b] = tmp[c];
    face[c] = tmp[d];
}

int main(){
    Dice dice1;
    string D;
    for(int i = 0;i < 6;i++){
        cin>>dice1.face[i];
    }
    cin>>D;
    for(int j = 0;j < D.size();j++){
        dice1.direction(D[j]);
    }
    cout<<dice1.face[0]<<endl;

    return 0;
}

Compiler output:
a.cc:11:25: error: 'b' has not been declared
   11 |     void move(int a,int,b,int c,int d);
      |                         ^
a.cc:12:2: error: expected ';' after class definition
   12 | }
      |  ^
      |  ;
a.cc: In member function 'void Dice::direction(char)':
a.cc:14:32: error: expected primary-expression before ')' token
   14 |     if(ch == 'N') move(0,1,5,4,);
      |                                ^
a.cc:15:23: error: no matching function for call to 'Dice::move(int, int, int, int)'
   15 |     if(ch == 'S') move(0,4,5,1);
      |                   ~~~~^~~~~~~~~
a.cc:11:10: note: candidate: 'void Dice::move(int, int, int, int, int)'
   11 |     void move(int a,int,b,int c,int d);
      |          ^~~~
a.cc:11:10: note:   candidate expects 5 arguments, 4 provided
a.cc:16:23: error: no matching function for call to 'Dice::move(int, int, int, int)'
   16 |     if(ch == 'W') move(0,2,5,3);
      |                   ~~~~^~~~~~~~~
a.cc:11:10: note: candidate: 'void Dice::move(int, int, int, int, int)'
   11 |     void move(int a,int,b,int c,int d);
      |          ^~~~
a.cc:11:10: note:   candidate expects 5 arguments, 4 provided
a.cc:17:23: error: no matching function for call to 'Dice::move(int, int, int, int)'
   17 |     if(ch == 'E') move(0,3,5,2);
      |                   ~~~~^~~~~~~~~
a.cc:11:10: note: candidate: 'void Dice::move(int, int, int, int, int)'
   11 |     void move(int a,int,b,int c,int d);
      |          ^~~~
a.cc:11:10: note:   candidate expects 5 arguments, 4 provided
a.cc: At global scope:
a.cc:20:6: error: no declaration matches 'void Dice::move(int, int, int, int)'
   20 | void Dice::move(int a,int b,int c,int d){
      |      ^~~~
a.cc:11:10: note: candidate is: 'void Dice::move(int, int, int, int, int)'
   11 |     void move(int a,int,b,int c,int d);
      |          ^~~~
a.cc:5:7: note: 'class Dice' defined here
    5 | class Dice{
      |       ^~~~
Language: C++

#include <iostream>
#include <string>

#define MAX_LEN (100)

using namespace std;

class Dice {
      private:
              int value[6];
              int top;
     
      public:             
              Dice(int value[]) {             
                   for (int i = 0; i < 6; i++) {
                        this->value[i] = value[i];
                   }
                   
                   this->top = value[0];
              }
              
              void swap(int a, int b) {
                   int temp = a;
                   a = b;
                   b = temp;
              }

              void move_N(int value[]) {
                   this->swap(value[0], value[1]);
                   this->swap(value[1], value[5]);
                   this->swap(value[5], value[4]);

                   this->top = value[0];
              }

              void move_E(int value[]) {
                   this->swap(value[0], value[3]);
                   this->swap(value[3], value[5]);
                   this->swap(value[5], value[2]);
 
                   this->top = value[0];
              }

              void move_W(int value[]) {
                   this->swap(value[0], value[2]);
                   this->swap(value[2], value[5]);
                   this->swap(value[5], value[3]);

                   this->top = value[0];
              }

              void move_S(int value[]) {
                   this->swap(value[0], value[4]);
                   this->swap(value[4], value[5]);
                   this->swap(value[5], value[1]);

                   this->top = value[0];
              }

              int Get_top() {
                  return (this->top);
              }
};

int main()
{
    int    value[6];  
    string inst;

    for (int i = 0; i < 6; i++) {
         do {
             cin >> value[i];
         } while (value[i] < 0 || value[i] > 100);
    }

    Dice dice(value);

    do {
        cin >> inst;
    } while (inst.length() < 0 || inst.length() > MAX_LEN);
        
    for (int i = 0; inst[i] != '\0'; i++){
         if (inst[i] == 'N') {
             dice->move_N(value);
         } else if (inst[i] == 'E') {
             dice->move_E(value);
         } else if (inst[i] == 'W') {
             dice->move_W(value);
         } else if (inst[i] == 'S') {
             dice->move_S(value);
         }
    }

    cout << dice->Get_top() << endl;

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:18: error: base operand of '->' has non-pointer type 'Dice'
   84 |              dice->move_N(value);
      |                  ^~
a.cc:86:18: error: base operand of '->' has non-pointer type 'Dice'
   86 |              dice->move_E(value);
      |                  ^~
a.cc:88:18: error: base operand of '->' has non-pointer type 'Dice'
   88 |              dice->move_W(value);
      |                  ^~
a.cc:90:18: error: base operand of '->' has non-pointer type 'Dice'
   90 |              dice->move_S(value);
      |                  ^~
a.cc:94:17: error: base operand of '->' has non-pointer type 'Dice'
   94 |     cout << dice->Get_top() << endl;
      |                 ^~
Language: C++

#include <iostream>
#include <string>

#define MAX_LEN (100)

using namespace std;

class Dice {
      private:
              int value[6];
              int top;
     
      public:             
              Dice(int value[]) {             
                   for (int i = 0; i < 6; i++) {
                        this->value[i] = value[i];
                   }
                   
                   this->top = value[0];
              }
              
              void swap(int a, int b) {
                   int temp = a;
                   a = b;
                   b = temp;
              }

              void move_N(int value[]) {
                   this->swap(value[0], value[1]);
                   this->swap(value[1], value[5]);
                   this->swap(value[5], value[4]);

                   this->top = value[0];
              }

              void move_E(int value[]) {
                   this->swap(value[0], value[3]);
                   this->swap(value[3], value[5]);
                   this->swap(value[5], value[2]);
 
                   this->top = value[0];
              }

              void move_W(int value[]) {
                   this->swap(value[0], value[2]);
                   this->swap(value[2], value[5]);
                   this->swap(value[5], value[3]);

                   this->top = value[0];
              }

              void move_S(int value[]) {
                   this->swap(value[0], value[4]);
                   this->swap(value[4], value[5]);
                   this->swap(value[5], value[1]);

                   this->top = value[0];
              }

              int Get_top() {
                  return (this->top);
              }
};

int main()
{
    int    value[6];  
    string inst;

    for (int i = 0; i < 6; i++) {
         do {
             cin >> value[i];
         } while (value[i] < 0 || value[i] > 100);
    }

    Dice dice(value);

    do {
        cin >> inst;
    } while (inst.length() < 0 || inst.length() > MAX_LEN);
        
    for (int i = 0; inst[i] != '\0'; i++){
         if (inst[i] == 'N') {
             dice.move_N(value);
         } else if (inst[i] == 'E') {
             dice->move_E(value);
         } else if (inst[i] == 'W') {
             dice->move_W(value);
         } else if (inst[i] == 'S') {
             dice->move_S(value);
         }
    }

    cout << dice->Get_top() << endl;

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:86:18: error: base operand of '->' has non-pointer type 'Dice'
   86 |              dice->move_E(value);
      |                  ^~
a.cc:88:18: error: base operand of '->' has non-pointer type 'Dice'
   88 |              dice->move_W(value);
      |                  ^~
a.cc:90:18: error: base operand of '->' has non-pointer type 'Dice'
   90 |              dice->move_S(value);
      |                  ^~
a.cc:94:17: error: base operand of '->' has non-pointer type 'Dice'
   94 |     cout << dice->Get_top() << endl;
      |                 ^~
Language: C++

#include <iostream>
#include <string>

using namespace std;

class Dice {
      private:
              int value[6];
              int top;
     
      public:             
              Dice(int value[]) {             
                   for (int i = 0; i < 6; i++) {
                        this->value[i] = value[i];
                   }
                   
                   this->top = value[0];
              }
              
              void swap(int& a, int& b) {
                   int temp = a;
                   a = b;
                   b = temp;
              }

              void move_N() {
                   this->swap(this->value[0], this->value[1]);
                   this->swap(this->value[1], this->value[5]);
                   this->swap(this->value[5], this->value[4]);

                   this->top = this->value[0];
              }

              void move_E() {
                   this->swap(value[0], value[3]);
                   this->swap(value[3], value[5]);
                   this->swap(value[5], value[2]);
 
                   this->top = this->value[0];
              }

              void move_W() {
                   this->swap(this->value[0], this->value[2]);
                   this->swap(this->value[2], this->value[5]);
                   this->swap(this->value[5], this->value[3]);

                   this->top = this->value[0];
              }

              void move_S() {
                   this->swap(this->value[0], this->value[4]);
                   this->swap(this->value[4], this->value[5]);
                   this->swap(this->value[5], this->value[1]);

                   this->top = this->value[0];
              }

              int Get_top() {
                  return (this->top);
              }
};

int main()
{
    int    value[6];  
    string inst;

    for (int i = 0; i < 6; i++) {
         do {
             cin >> value[i];
         } while (value[i] < 0 || value[i] > 100);
    }

    Dice dice(value);

    do {
        cin >> inst;
    } while (inst.length() < 0 || inst.length() > MAX_LEN);
        
    for (int i = 0; inst[i] != '\0'; i++){
         if (inst[i] == 'N') {
             dice.move_N();
         } else if (inst[i] == 'E') {
             dice.move_E();
         } else if (inst[i] == 'W') {
             dice.move_W();
         } else if (inst[i] == 'S') {
             dice.move_S();
         }
    }

    cout << dice.Get_top() << endl;

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:78:51: error: 'MAX_LEN' was not declared in this scope
   78 |     } while (inst.length() < 0 || inst.length() > MAX_LEN);
      |                                                   ^~~~~~~