Write a function to delete a node containing Book's information from a dynamically allocated stack of Books implemented with the help of the following structure.
struct BOOK{ int BNo; char BNAME[20]; BOOK*NEXT;};
1
Expert's answer
2013-02-21T08:09:36-0500
struct BOOK{ int BNo; char BNAME[20]; BOOK*NEXT;};
void deleteBook(BOOK &a){ //we delete next BOOK after BOOK a a.NEXT = (a.NEXT)->NEXT; }
Comments
Leave a comment