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

Function main

Examples/NoModules/Chapter 15/Ex15_05/Ex15_05.cpp:13–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

showVolumeFunction · 0.70

Tested by

no test coverage detected