constructors-point-rectangle/boiled-down-for-notes-cpp11/point.cc - Implementation of the Point class constructors. | Lecture 4 - slide 5 : 40 Program 2 |
// Definition of constructors with constructor chaining - C++11 #include <cmath> #include <iostream> #include "point.h" Point::Point(): Point{0.0, 0.0}{ } Point::Point(double x_coord): Point{x_coord, 0.0}{ } Point::Point(double x_coord, double y_coord): x{x_coord}, y{y_coord}{ }