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

Function printList

Exercises/NoModules/Chapter 18/Soln18_02/Soln18_02.cpp:9–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <string_view>
8
9void printList(std::string_view message, const LinkedList<std::unique_ptr<int>>& list)
10{
11 std::cout << message << ": ";
12 for (auto iterator{ list.front_iterator() }; iterator; iterator.next())
13 {
14 std::cout << *iterator.value() << ' ';
15 }
16 std::cout << std::endl;
17}
18
19int main()
20{

Callers 1

mainFunction · 0.70

Calls 2

front_iteratorMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected