Advertisement
Guest User

Untitled

a guest
Aug 9th, 2011
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <stack>
  3.  
  4. using namespace std;
  5.  
  6. int main(void){
  7.     stack<string> container;
  8.     string strs[]={"hello", " world!"};
  9.     for(int i=0;i<2;i++){
  10.         container.push(strs[i]);
  11.     }
  12.     while(!container.empty()){
  13.         cout <<  container.top()<<endl;
  14.         container.pop();
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement