Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. int main()
  2. {
  3. ListHead list = ListHead();
  4. ListHead list2 = ListHead();
  5.  
  6. cout << "list: "; list.printList(); cout << endl;
  7. cout << "list2: "; list.printList(); cout << endl;
  8.  
  9. if (list == list2)
  10. {
  11. cout << "listy sa identyczne" << endl;
  12. }
  13. list += "3"; list += "4";
  14. list2 += "4"; list2 += "3";
  15.  
  16. cout << "list: "; list.printList(); cout << endl;
  17. cout << "list2: "; list.printList(); cout << endl;
  18.  
  19. list += Element("5");
  20. if (list != list2)
  21. {
  22. cout << "listy sa rozne" << endl;
  23. }
  24.  
  25. list -= "5";
  26. list -= "3";
  27. list -= "4";
  28. list2 -= "4";
  29. list2 -= Element("5");
  30. list2 -= Element("3");
  31.  
  32. cout << "list: "; list.printList(); cout << endl;
  33. cout << "list2: "; list.printList(); cout << endl;
  34.  
  35. list += "1"; list += "2"; list += "3";
  36. list2 += "4"; list2 += "5";
  37.  
  38. cout << "list: "; list.printList(); cout << endl;
  39. cout << "list2: "; list.printList(); cout << endl;
  40. system("pause");
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement