if (newNodePtr == NULL)
{
cout << Not enough memory to insert << item << endl;
exit(1);
}
Change the postcondition for InsertTop to the following:
//IF not enough memory to add item to list
// Program has halted with an error message
// ELSE
// New node containing item is inserted at top of linked list
// && component members of list nodes are in ascending order
Change the postcondition for Insert to the following:
// IF not enough memory to add item to list
// Program has halted with an error message
// ELSE
// New node containing item is inserted into its proper place
// in linked list
// && component members of list nodes are in ascending order