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

Method listBoxes

Examples/NoModules/Chapter 12/Ex12_18/Truckload.cpp:35–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.45

Calls 1

listBoxMethod · 0.45

Tested by

no test coverage detected