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

Function main

Examples/Modules/Chapter 15/Ex15_11/Ex15_11.cpp:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import can;
7
8int main()
9{
10 Box box {40, 30, 20};
11 Can can {10, 3};
12 Carton carton {40, 30, 20, "Plastic"};
13 ToughPack hardcase {40, 30, 20};
14
15 std::vector<const Vessel*> vessels {&box, &can, &carton, &hardcase};
16
17 for (const auto* vessel : vessels)
18 std::cout << "Volume is " << vessel->volume() << std::endl;
19}

Callers

nothing calls this directly

Calls 1

volumeMethod · 0.45

Tested by

no test coverage detected