| constructors-point-rectangle/more-about-constructs/point1.h - The Point class - with explicit and defaulted constructors. | Lecture 4 - slide 7 : 40 Program 4 |
// Class Point with explicit constructor, and defaulted copy constructor.
class Point {
private:
double x, y;
public:
Point();
explicit Point(double x); // Cannot be used in implicit type conversions
Point(double x, double y);
Point(const Point&) = default; // We want to have the default generated copy constructor
// other members
};