Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Copyright (c) 2018 Thomas Marshall
- University of Pretoria : U18007563 */
- #include <iostream>
- #include <string>
- #include "encounterNode.h"
- #include "l_list.h"
- int main() {
- int size = 4;
- std::string arr[] = {"Imp", "Cyber Demon", "Lost Soul", "Imp"};
- std::string rew = "Boots of Healing";
- int size1 = 3;
- std::string arr1[] = {"Imp", "Mancubus", "Hell Knight"};
- std::string rew1 = "Sword of Death";
- int size2 = 5;
- std::string arr2[] = {"Imp", "Mancubus", "Hell Knight", "Mancubus", "Your mom"};
- std::string rew2 = "Sword of Health Knights";
- l_list* list = new l_list();
- /* Add to front */
- list->addToFront(arr, size, rew);
- list->addToFront(arr1, size1, rew1);
- list->addToFront(arr2, size2, rew2);
- /* Print full */
- std::cout << "PRINT LIST IN FULL\n===================\n";
- list->printList();
- std::cout << "\n";
- list->addAtIndex(arr, size, rew2, 2);
- /* Print full */
- std::cout << "PRINT LIST IN FULL\n===================\n";
- list->printList();
- std::cout << "\n";
- /* Remove at index */
- std::cout << "REMOVE AT INDEX\n===================\n";
- list->removeFromIndex(0);
- list->printList();
- std::cout << "\n";
- /* Delete list */
- std::cout << "DELETE LIST\n===================\n";
- delete list;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement