next up previous contents
Next: The MergeSort Agents for Up: CHAR_DL_CELL Source: Previous: The Constructor/Destructor Code:

The Print/ Grab Code:

    // ************************************************** //
    // const print function for CHAR_DL_CELL              //
    // ************************************************** //
ostream& CHAR_DL_CELL::print(ostream& output) const
{
  if(previous!=NULL)
    output << "<-->";
  output << element;
  if(next==NULL)
    output << ".";
  return output;
}

 
    // ************************************ //
    //    grab function for CHAR_DL_CELL    //
    // ************************************ //

istream& CHAR_DL_CELL::grab(istream& in)
{
  
  in >> element;
  return(in);
}



Jim Peterson
1999-04-22