Question: what the mistake in my code #include #include using namespace std; struct NODE { int info; struct NODE *next; }; struct NODE *TOP = NULL;

what the mistake in my code

#include #include using namespace std; struct NODE { int info; struct NODE *next; };

struct NODE *TOP = NULL; void PUSH (int item)

{ struct NODE *NewNode; NewNode = new (NODE); // Creates NODE and store its address into NewNode if(NewNode==NULL) { coutinfo = item; NewNode->next = TOP; TOP=NewNode;

} int POP () { int item = TOP -> info; T=TOP; TOP = TOP->next; delete T; // it release the memory of deleted NODE return item; } int PEAK () { return (TOP -> info); } void TRAVERSE () { struct NODE *T; For( T=TOP ; T!=NULL ;T=T->next) coutinfo

int main () { struct NODE *T;

int item, choice; while(1) {

cout "; cin>> choice; switch(choice) { case 1: cout>item; PUSH(item); break; case 2: if(IsEmpty()) {cout

what the mistake in my code #include #include using namespace std; struct

In function 'int POPO': [Error] 'T' was not declared in this scope [Error] type '' argument given to 'delete', expected pointer In function 'void TRAVERSEOS: [Error] expected ')' before ';' token [Error] expected ;' before ')' token recipe for target 'lab5.o' failed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!