![]() ![]() ![]() ![]() | Point.h. | Lecture 2 - slide 27 : 42 Program 5 |
// Now overloading examples with class Point. // Class point with a constructor of type double, and a conversion from Point to double. class Point { private: double x, y; public: Point(double d); operator double() const; double getx () const; double gety () const; }; std::ostream& operator<<(std::ostream&, const Point&);