next up previous contents
Next: The Complex Exponential ez: Up: The Definition File mycomplex.c: Previous: The Usual Private Print

The Overloaded Input and Output Operators:

     //====================================================//
     //                                                    //
     //                Overloaded Input                    //
     //                                                    //
     //====================================================//
istream& operator>>(istream& input,MYCOMPLEX& w)
{
  w.grab(input);
  return(input);
}
     //====================================================//
     //                                                    //
     //                Overloaded Input                    //
     //                                                    //
     //====================================================//
istream& operator>>(istream& input,MYCOMPLEX* w)
{
  w->grab(input);
  return(input);
}
     //====================================================//
     //                                                    //
     //                Overloaded Output                   //
     //                                                    //
     //====================================================//
ostream& operator<<(ostream& output,const MYCOMPLEX& w)
{
  w.print(output);
  return(output);
}
     //====================================================//
     //                                                    //
     //                Overloaded Output                   //
     //                                                    //
     //====================================================//
ostream& operator<<(ostream& output,const MYCOMPLEX* w)
{
  w->print(output);
  return(output);
}



Jim Peterson
1999-04-22