Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

simplest code for stack implementation in c++

void pop() {
   if(top<=-1)
   cout<<"Stack Underflow"<<endl;
   else {
      cout<<"The popped element is "<< stack[top] <<endl;
      top--;
   }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #simplest #code #stack #implementation
ADD COMMENT
Topic
Name
6+4 =