Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

cpp stacks

#include <iostream> 
#include <stack> 
using namespace std;
int main() {
    stack<int> stack;
    stack.push(21);
    stack.push(22);
    stack.push(24);
    stack.push(25);
      
         stack.pop();
    stack.pop();
  
    while (!stack.empty()) {
        cout << ' ' << stack.top();
        stack.pop();
    }
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #cpp #stacks
ADD COMMENT
Topic
Name
1+9 =