C++ Constructor Default Constructor Parameter Values

Description

C++ Constructor Default Constructor Parameter Values

class Pool {//from w w w. ja  v  a  2s. c  o m
private:
  double length;
  double width;
  double height;

public:
  // Constructors
  Pool(double lv = 1.0, double wv = 1.0, double hv = 1.0);
  Pool();                                            // No-arg constructor

  double volume();                                  // Function to calculate the volume of a pool
};



PreviousNext

Related