next up previous contents
Next: CHAR_DL_CELL Source: Up: The Source: charsllist.c Previous: The Merge Sort Code:

The Print/ Grab Functions:

    // ********************************************************* //
    // const print function for CHAR_SL_CELL                     //
    // ********************************************************* //

ostream& CHAR_SL_CELL::print(ostream& output) const
{
  if(this!=NULL){
    output << element;
    if(next!=NULL)
      output << "-->";
    else
      output << ".";
    return(output);
    }
  else{
    cout << "CELL is NULL " << endl;
    return(output);
    }
}

    // ***************************************** //
    //     grab function for CHAR_SL_CELL        //
    // ***************************************** //
istream& CHAR_SL_CELL::grab(istream& in)
{
  
  in >> element;
  return(in);
}



Jim Peterson
1999-04-22