Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include "list.h"
  3.  
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.  
  11.  
  12. List myList;
  13.  
  14.  
  15.  
  16. myList.headInsert(0);
  17. myList.headInsert(1);
  18. myList.headInsert(2);
  19. myList.tailInsert(3);
  20. myList.tailInsert(4);
  21. myList.tailInsert(5);
  22.  
  23. cout << "Current list: " << myList << endl;
  24.  
  25. for (int i = 0; i<4; i++) {
  26. cout << "Value off list: " << myList.headRemove() << endl;
  27.  
  28. cout << "Current list: " << myList << endl;
  29. }
  30.  
  31.  
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement