home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2000 June / APC561.ISO / workshop / c / deque.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-02  |  310 b   |  25 lines

  1. #include <iostream>
  2. #include <string>
  3. #include <deque>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.   string s;
  10.   deque<string> d;
  11.  
  12.   while (getline( cin, s ) && s.length()) {
  13.     d.push_back( s );
  14.   }
  15.  
  16.   while (d.size()) {
  17.     cout << d.front() << '\n';
  18.     d.pop_front();
  19.   }
  20.  
  21.   return 0;
  22. }
  23.  
  24.  
  25.