Language: C++

#include <stdlib.h>
#include <string>
#include <iostream>
using namespace std;

class node{
public:
	int data;
	// node *prev;
	node *next;
    node(){
    	// prev = 0;
    	next = 0;
    	data = 0;
    }
    node(int data){
    	// prev = 0;
    	next = 0;
    	this->data = data;
    }
    friend class double_linked_list;
};

class double_linked_list{
public:
	node *first;
	node *last;
	double_linked_list(){
		first = 0;
		last  = 0;
	}
	void insert_value(int data);
	void delete_value(int data);
	void delete_first();
	void delete_last();
};

void double_linked_list::insert_value(int data){
	if(first == 0){
		node *new_first = new node(data);
		first = new_first;
		last = new_first;
	}else{
		node *new_first = new node(data);
		// first->prev = new_first;
		new_first->next = first;
		first = new_first;
	}
}
void double_linked_list::delete_value(int data){
	node *current_node = first;
	// no data
	if(current_node == 0){
		return;
	}
	// first
	if(current_node->data == data){
		this->delete_first();
		return;
	}
	node *previous_node = current_node;
	current_node = current_node->next;
	while(current_node != 0){
		if(current_node->data == data){
			if(current_node->next != 0){
				previous_node->next = current_node->next;
				// current_node->prev->next = current_node->next;
				// current_node->next->prev = current_node->prev;
			}else{
				//last
				previous_node->next = 0;
				last = previous_node;
				// current_node->prev->next = 0;
				// last = current_node->prev;
			}
			return;
		}
	previous_node = current_node;
	current_node = current_node->next;
	}
}
void double_linked_list::delete_first(){
	node *current_node = first;
	// no data
	if(current_node == 0){
		return;
	}
	if(current_node->next != 0){
		// current_node->next->prev = 0;
		first = current_node->next;
		return;
	}
	first = 0;
	last = 0;
	return;
}
void double_linked_list::delete_last(){
	if(this->last == 0){
		return;
	}
	if(last->prev != 0){
		last->prev->next = 0;
		last = last->prev;
	}else{
		last = 0;
		first = 0;
	}
}
int main(){
	int num;

	cin >> num;

	string command;
	int value;
	double_linked_list *result_list = new double_linked_list();
	for(int i = 0; i < num; ++i){
		cin >> command;
		if(command[0] == 'i'){
			cin >> value;
			result_list->insert_value(value);
		}else{
			if(command[6] == '\0'){
				cin >> value;
				result_list->delete_value(value);
			}
			else if(command[6] == 'F'){
				result_list->delete_first();
			}
			else if(command[6] == 'L'){
				result_list->delete_last();
			}
		}
	}
	node *test = result_list->first;
	while(test != 0){
		cout << test->data;
		if(test->next != 0){
			cout << " ";
		}
		test = test->next;
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In member function 'void double_linked_list::delete_last()':
a.cc:101:18: error: 'class node' has no member named 'prev'
  101 |         if(last->prev != 0){
      |                  ^~~~
a.cc:102:23: error: 'class node' has no member named 'prev'
  102 |                 last->prev->next = 0;
      |                       ^~~~
a.cc:103:30: error: 'class node' has no member named 'prev'
  103 |                 last = last->prev;
      |                              ^~~~