1. Write the definition of a member function
PUSH() in C++, to add a new book in a
dynamic stack of BOOKS considering the
following code is already included in the
program: All India 2015
struct BOOKS
{
char ISBN[20]. TITLE[80];
BOOKS *Link;
};
class STACK
{
BOOKS *Top;
public:
STACK() {Top=NULL; }
void PUSH();
void POP();
~STACK();
Answers
Answered by
1
void STACK :: push()
{
BOOKS *temp;
temp=new BOOKS;
cout<<"Enter data:";
gets(temp->ISBN);
gets(temp->TITLE);
temp->Link;
}
Similar questions
Computer Science,
4 months ago
Hindi,
4 months ago
Social Sciences,
8 months ago
Math,
8 months ago
English,
11 months ago