| 17 | }; |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | Box firstBox {80.0, 50.0, 40.0}; // Create a box |
| 22 | double firstBoxVolume {firstBox.volume()}; // Calculate the box volume |
| 23 | std::cout << "Volume of Box object is " << firstBoxVolume << std::endl; |
| 24 | |
| 25 | Box secondBox; // No longer causes a compiler error message |
| 26 | } |
| 27 | |
| 28 | // Constructor definition |
| 29 | Box::Box(double length, double width, double height) |