MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / main

Function main

Examples/Modules/Chapter 15/Ex15_05/Ex15_05.cpp:11–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11int main()
12{
13 Box box {20.0, 30.0, 40.0}; // A base box
14 ToughPack hardcase {20.0, 30.0, 40.0}; // A derived box - same size
15 Carton carton {20.0, 30.0, 40.0, "Plastic"}; // A different derived box
16
17 showVolume(box); // Display volume of base box
18 showVolume(hardcase); // Display volume of derived box
19 showVolume(carton); // Display volume of derived box
20}

Callers

nothing calls this directly

Calls 1

showVolumeFunction · 0.70

Tested by

no test coverage detected