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

Method listBoxes

Examples/Modules/Chapter 12/Ex12_18/Truckload.cpp:34–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void Truckload::listBoxes() const
35{
36 const size_t boxesPerLine{ 4 };
37 size_t count {};
38 for (Package* package{m_head}; package; package = package->m_next)
39 {
40 std::cout << ' ';
41 package->m_box->listBox();
42 if (! (++count % boxesPerLine)) std::cout << std::endl;
43 }
44 if (count % boxesPerLine) std::cout << std::endl;
45}
46
47
48SharedBox Truckload::getFirstBox()

Callers 1

mainFunction · 0.45

Calls 1

listBoxMethod · 0.45

Tested by

no test coverage detected