Question: Please help with c++ code. I am confused on how to finish it. Thank you!! Using the STL list container, create the list on page

Please help with c++ code. I am confused on how to finish it. Thank you!!

Using the STL list container, create the list on page 1157 (18 - 6).

? Define a list object, and call a function to populate it using a loop as shown in 18-6.

? Call a function to display the list and output the number of nodes in the list.

? Then, call a function to add to the list the numbers (5, 15, 25, 35, 45, 55, 65, 75, 85) inserting them in numerical order using a loop, an iterator, list.begin, and list.insert. ? Then call the display function to display the list again and the number of nodes.

? Then reverse the list and display it again, and output the number of nodes.

? Then call a function that removes the ends of the list, and then redisplay the list and the number of nodes.

All output is to be done in the output function. The output function that displays the list must accept a string for the message prior to displaying the list and the number of nodes. Sample output function declaration: void display_list(list &myList, string message); Sample output function call: display_list(myList, "The original list is: "); The program must use an iterator in the solution for adding the fives and for output.

Please help with c++ code. I am confused on how to finish

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!