Homework/HW07/bin-trees-B.cc
void testDynamicAllocation (void * pointer)
{
    if (!pointer)  // if "pointer" is NULL
    {
        cout << "\nDynamic allocation failure.  Program being terminated."
             << endl;
        exit(1);  // EXIT FROM THE ENTIRE PROGRAM
    }
}
/*******************  T E S T   D Y N A M I C   A L L O C A T I O N  *********

This utility function assumes that the value of the parameter "pointer" 
has been obtained by a call to the "new" function.  If that function
was unable to dynamically allocate the required amount of memory space,
then it returned the value NULL.  This function tests to see whether
the value returned was NULL, and if it was, it terminates the program.
The parameter type is "pointer-to-void" so that any pointer data type
can be passed to this function.   Documented and coded by W. Knight. */
T E S T   D Y N A M I C   A L L O C A T I O N
This utility function assumes that the value of the parameter "pointer"
has been obtained by a call to the "new" function.  If that function
was unable to dynamically allocate the required amount of memory space,
then it returned the value NULL.  This function tests to see whether
the value returned was NULL, and if it was, it terminates the program.
The parameter type is "pointer-to-void" so that any pointer data type
can be passed to this function.   Documented and coded by W. Knight.
T E S T D Y N A M I C A L L O C A T I O N This utility function assumes that the value of the parameter " pointer " has been obtained by a call to the " new " function . If that function was unable to dynamically allocate the required amount of memory space then it returned the value NULL . This function tests to see whether the value returned was NULL and if it was it terminates the program . The parameter type is " pointer - to - void " so that any pointer data type can be passed to this function . Documented and coded by W . Knight .
void testDynamicAllocation (void * pointer)
{
    if (!pointer)  
    {
        cout << "\nDynamic allocation failure.  Program being terminated."
             << endl;
        exit(1);  
    }
}
void testDynamicAllocation ( void * pointer ) { if ( ! pointer ) { cout << " \n " << endl ; exit ( 1 ) ; } }
T E S T   D Y N A M I C   A L L O C A T I O N
This utility function assumes that the value of the parameter "pointer"
has been obtained by a call to the "new" function.
T E S T D Y N A M I C A L L O C A T I O N This utility function assumes that the value of the parameter " pointer " has been obtained by a call to the " new " function .
// if "pointer" is NULL // EXIT FROM THE ENTIRE PROGRAM