03C-2016
CBSE12D-2016
Problem Statement - 03D
Write the definition of a member function AddPacket() for a class QUEUE in C++, to remove/delete a Packet from a dynamically allocated QUEUE of Packets considering the following code is already written as a part of the program.
struct Packet { int PID; char Address[20]; Packet *LINK; }; class QUEUE { Packet *Front, *Rear; public: QUEUE(){Front=NULL;Rear=NULL;} void AddPacket(); void DeletePacket(); ~QUEUE(); };
Solution
CSKC| Created: 2-Jan-2019 | Updated: 1-Apr-2019|CBSE12A-2018