Share
Explore BrainMass

C++ List

Write C++ code that does the following:
 Create a list with the elements: 43,67,11,78 and 52
 Add item 60 to the list
 Sort the list in descending order
 Delete item 52
 Use Binary Search to find item 70 in the list

Sample output shown:

Printing the 5 elements in the list...
43 67 11 78 52
The length of the list is 5
Adding item 60.....
43 67 11 78 52 60
The length of the list is 6
Sorting the list in descending order....
78 67 60 52 43 11
Deleting item 52....
78 67 60 43 11
The length of the list is 5
Item 70 not found in the list.

$2.19