Can ANYONE help me with this im so lost onlinked list !!!!!
- write a C++ program that will manipulate data stored in a self-organizing linked list. A self –organizing list moves frequently used entries to the beginning of the list. This program will be inputting data from files, writing and calling functions, using a linked list, and outputting data to a file. use only one linked list.
- The infotype in this problem will consist of a name (string), a phone number (string) and a counter (int). Whenever a phone number is looked up, one is added to the counter for that node.
Datafile “friends.txt” contains lines of the following format:
<name> <phone number >
Data items are separated by blanks.
Each line of file “Lookup.txt” contains a name.
- Store the data from file “friends.txt” in a linked list using pointers. The order of items in the list should be the same as the order in the file. After the list is created, print out the linked list.
- For each entry from “Lookup.txt”, search the linked list for the input name. Print to the screen the name and phone number. Print a message for names that are not found. In addition, increment the counter in the node. If the counter in a node becomes 3, reset the counter to zero and move that entry to the beginning of the list.
- After all entries from “Lookup.txt” are processed, print out the list of names, phone numbers and counters to the screen. Also, create an output file containing the list of names, phone numbers, and counters.
- Use functions to accomplish each task. Use function prototypes. Declare the main function before you declare additional functions.
- Print an error message if the either input file is missing.