## Unanswered: help help i need help

i need this problem 2 be solved quickly plz help me i hve a simple code that i wrote i hope it code helps u

a double-ended queue or deque(pronounced"deck")is a generalization of botha stackand a queue.
itsupports the insertion and removal of items from either the front of the back of the queue.
using a dynamiclist,implement a deque class that supportsthe following:
deque //construct an empty deque.
bool is Empty //return true if the queue is empty,false otherwise.
void addfirst(Item item) //insert an item @ the front of the qeueu.
void addlast(Item item) //insert the item @ the end of the qeueu.
Item removerfirst() //delete and return the first item in the queue.
Item removelast() //delete and return the last item in the queue
And plz write the main() for me

# include <iostream.h>

class deque
{
private:
struct node
{
int data ;
node * next;
};
node* tail;
public:
deque();
bool empty ();
void enque(int e);
int removefirst(int e);
int removelast(int e);
};

deque::deque()
{
tail=0;

}

bool deque ::empty()
{
}

void deque::enque(int e)
{
node*p=new node;
p->data=e;
p->next=0;
{
}
else
{
tail->next=p;
}
tail=p;
}

{
node*p=new node;
p->data=item;
}
{
node*p=new node;
p->data=item;
tail->next=p;
tail=p;
}

int deque::removefirst(int e)
{
node*z=new node;
e=z->data;
delete z;
return e;
}

int removelast(int e)
{
node* z=new node;
node* w=new node;
while(z->next!=tail)
{
z=z->next;
w=tail;
e=w->data;
tail=z;

}
delete w;
return e;
}

a double-ended queue or deque(pronounced"deck")is a generalization of botha stackand a queue.
itsupports the insertion and removal of items from either the front of the back of the queue.
using a dynamiclist,implement a deque class that supportsthe following:
deque //construct an empty deque.
bool is Empty //return true if the queue is empty,false otherwise.
void addfirst(Item item) //insert an item @ the front of the qeueu.
void addlast(Item item) //insert the item @ the end of the qeueu.
Item removerfirst() //delete and return the first item in the queue.
Item removelast() //delete and return the last item in the queue