Need help with this C++ code. Please if possible comment thecode and take a screenshot. This is similar to the linear insertionsort you have already written, but uses a linked list. Here is themethod:
- Ask the user for the name of a file containing data. If it doesnot exist, the program should display an error, then ask for a newfile name. Entering an asterisk (*) should exit the program.
- Create a “head” that is a pointer to your first list node andinitialize it.
- The way linear insertion works is this:
- If the list is empty, create a new node with the number as
OROR