Advertisement
Need4Sleep

PointType.cpp (DailyC++) 7/22/12

Jul 23rd, 2012
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. /// http://www.cplusplus.com/forum/beginner/75558/
  2. #include "PointType.h"
  3.  
  4. std::ostream & operator<<(std::ostream & os, PointType & cords)
  5. {
  6.     os << "(x,y) format: (" << cords.x << "," << cords.y << ")\n";
  7.     return os;
  8. }
  9.  
  10. std::ostream & operator<<(std::ostream & os, Circle & crcl)
  11. {
  12.     os << "Center: (" << crcl.getx() << "," << crcl.gety() << ")\n";
  13.     os << "Radius: " << crcl.r << "\nArea: " << crcl.Area() <<
  14.     "\nCircumference"
  15.     return os;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement