All of the functions to implement the mergesort algorithm are implemented in the split, merge and mergesort agents in the SL_CELL class. We can utilize this capability with a call to the mergesort agent for the SL_CELL object pointer head.
// ************************************ //
// merge sort for CHAR_SLLIST //
// ************************************ //
void CHAR_SLLIST::mergesort()
{
head = head->mergesort(head);
}