#include
class Node
{
public:
int value; //This could really be any type
Node* next;
Node* prev;
Node(int val){
std::cout next=(Node*)0;
this->prev=(Node*)0;
}
~Node(){
std::cout head=x;
this->tail=x;
x->prev=0;
x->next=0;
}else if (this->tail=n){
this->tail=x;
}
}
void display(){
Node* i=this->head;
std::cout insert(l->head,new Node(6));
l->insert(l->head,new Node(8));
l->display();
delete l;
return 0;
}
Нужно добавить функцию удаления элемента в этот код.