| 27 | }; |
| 28 | |
| 29 | int main() |
| 30 | { |
| 31 | Box firstBox {80.0, 50.0, 40.0}; // Create a box |
| 32 | double firstBoxVolume {firstBox.volume()}; // Calculate the box volume |
| 33 | std::cout << "Volume of Box object is " << firstBoxVolume << std::endl; |
| 34 | |
| 35 | // Box secondBox; // Causes a compiler error message |
| 36 | } |