Please get the zip and extract the files to your cs115 directory:
curl https://www.labs.cs.uregina.ca/115/CODE/11-LinkedList-Demo.zip -O -s unzip 11-LinkedList-Demo.zip
curl https://www.labs.cs.uregina.ca/115/CODE/11-LinkedList-NULL.zip -O -s unzip 11-LinkedList-NULL.zip
OR
curl https://www.labs.cs.uregina.ca/115/CODE/11-LinkedList-nullptr.zip -O -s unzip 11-LinkedList-nullptr.zip
To compile the linked list code, type
make
The purpose of the program is to demonstrate operations on a simple singly linked list.
Now you should be ready to start adding code to that program.
Compile and run this C++ program.
Compile and run this C++ program.
Compile and run this C++ program.
Try deleting the first, last and middle node. Also try to remove something that is not in the list (an appropriate message should be printed).
Notice that you code should work when you are trying to delete and item at the beginning, at the end, and in the middle. It should also still work and provide a message if an item does not exist. Please try the steps below to ensure that your code is working as expected before submitting.
Monday, 25-Nov-2024 08:46:18 CST |
|
|
|