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

Function main

Examples/Modules/Chapter 12/Ex12_05/Ex12_05.cpp:33–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33int main()
34{
35 Box box1{ 2.0, 3.0, 4.0 }; // An arbitrary box
36 Box box2{ 5.0 }; // A box that is a cube
37 std::cout << "box1 volume = " << box1.volume() << std::endl;
38 std::cout << "box2 volume = " << box2.volume() << std::endl;
39}
40
41double Box::volume()
42{

Callers

nothing calls this directly

Calls 1

volumeMethod · 0.45

Tested by

no test coverage detected