Computer Science, asked by rachnagoyal81, 10 months ago

- Write a function QDELETE() in C++ to
perform delete operation in a Linked
Queue, which contains Passenger number
and Passenger name. Consider the
following definition of node in the code.
All India 2013
struct node
{
long int Pno;
char Pname[20]:
node *Link;
};​

Answers

Answered by Anonymous
3

you have to make a class also to implement Linked list (Queue):-

struct node

{

long int Pno;

char Pname[20]:

node *Link;

};

class QUEUE

{

node*rear, *front;

public:

QUEUE()

{

rear= NULL;

front=NULL;

}

void QDELETE();

};

void QUEUE :: QDELETE();

{

if(front!=NULL)

{

node*temp = front;

cout<<front->Pname<<front->Pno<<"deleted";

front= front->Link;

}

else

{

cout<<"empty ";

}

}

Similar questions