Mega Code Archive

 
Categories / C++ / Queue Stack
 

Stack of string and vectorstring

#include <iostream> #include <string> #include <stack> #include <vector> using namespace std; int main() {      stack< string, vector<string> > s;      s.push( "me" );      s.push( "to" );      s.push( "talk" );      while ( !s.empty() ) {           cout << s.top() << " ";           s.pop();      }      return 0; }