Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- ListHead list = ListHead();
- ListHead list2 = ListHead();
- cout << "list: "; list.printList(); cout << endl;
- cout << "list2: "; list.printList(); cout << endl;
- if (list == list2)
- {
- cout << "listy sa identyczne" << endl;
- }
- list += "3"; list += "4";
- list2 += "4"; list2 += "3";
- cout << "list: "; list.printList(); cout << endl;
- cout << "list2: "; list.printList(); cout << endl;
- list += Element("5");
- if (list != list2)
- {
- cout << "listy sa rozne" << endl;
- }
- list -= "5";
- list -= "3";
- list -= "4";
- list2 -= "4";
- list2 -= Element("5");
- list2 -= Element("3");
- cout << "list: "; list.printList(); cout << endl;
- cout << "list2: "; list.printList(); cout << endl;
- list += "1"; list += "2"; list += "3";
- list2 += "4"; list2 += "5";
- cout << "list: "; list.printList(); cout << endl;
- cout << "list2: "; list.printList(); cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement