Advertisement
Guest User

Untitled

a guest
Jun 10th, 2010
761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iomanip>
  2. using std::setw;
  3.  
  4. #include "Point.h"
  5.  
  6. ostream &operator<<( ostream &output, const Point &number )
  7. {
  8.     output << "(" << number.xCoordinate << "," << number.yCoordinate << ")";
  9.     return output;
  10. }
  11.  
  12. istream &operator>>( istream &input, Point &number )
  13. {
  14.     input.ignore();
  15.     input >> setw( 1 ) >> number.xCoordinate;
  16.     input.ignore();
  17.     input >> setw( 1 ) >> number.yCoordinate;
  18.     input.ignore();
  19.     return input;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement