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

Function main

Examples/NoModules/Chapter 13/Ex13_02/Ex13_02.cpp:14–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14int main()
15{
16 std::vector boxes {Box {2.0, 2.0, 3.0}, Box {1.0, 3.0, 2.0},
17 Box {1.0, 2.0, 1.0}, Box {2.0, 3.0, 3.0}};
18 const double minVolume{6.0};
19 std::cout << "Objects with volumes less than " << minVolume << " are:\n";
20 for (const auto& box : boxes)
21 if (box < minVolume) show(box);
22
23 std::cout << "Objects with volumes greater than " << minVolume << " are:\n";
24 for (const auto& box : boxes)
25 if (minVolume < box) show(box);
26}

Callers

nothing calls this directly

Calls 1

showFunction · 0.70

Tested by

no test coverage detected