Quick Print – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
Solved Problem Solved Problem#CPP#7009

Problem Statement - 03D-2019S-C2

For the following structure of Books in C++

Struct Book
{
  int   Bno;
  char  Bname[20];
  Book  *Link;
};

Given that the following declaration of class BookStack in C++ represents a dynamic stack of Books:

class BookStack
{
  Book*Top; // inter with address of Topmost book of Stack
public:
  BookStack()
  {
     Top = NULL;
  }
  void Push();  //Function to push a Book into the dyanmic Stack
  void Pop(); Function to pop a Book from the dynamic stack
  ~BookStack();
};

 

Solution