Created
          July 21, 2015 14:37 
        
      - 
      
- 
        Save krysseltillada/f8f90c5344cfa02bc495 to your computer and use it in GitHub Desktop. 
    std::list whose elements are std::deque that are integer
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <iostream> | |
| #include <list> | |
| #include <deque> | |
| int main () | |
| { | |
| std::list <std::deque <int> > list_deq; | |
| std::deque <int> temp_deq, temp_deq2; | |
| int temp_int = 0; | |
| while (std::cin >> temp_int) { | |
| temp_deq.push_front (temp_int); | |
| std::cin >> temp_int; | |
| temp_deq2.push_back (temp_int); | |
| } | |
| list_deq.push_front (temp_deq); | |
| list_deq.push_front (temp_deq2); | |
| for (auto ld : list_deq) { | |
| for (auto d : ld) { | |
| std::cout << d << " "; | |
| } | |
| std::cout << " , "; | |
| } | |
| return 0; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment