Computer Science, asked by rachnagoyal81, 8 months ago

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 Anonymous
1

void STACK :: push()

{

BOOKS *temp;

temp=new BOOKS;

cout<<"Enter data:";

gets(temp->ISBN);

gets(temp->TITLE);

temp->Link;

}

Similar questions