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
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
In function 'int POPO': [Error] 'T' was not declared in this scope [Error] type '
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started