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

Function main

Exercises/NoModules/Chapter 09/Soln9_02.cpp:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 size_t width = 10);
18
19int main()
20{
21 int samples[]{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
22
23 int dataItem{ -99 };
24 show_data({ &dataItem, 1 }); // Call original function directly
25
26 dataItem = 13;
27 show_data(dataItem, "Unlucky for some!"); // Use extra overload
28
29 show_data(samples);
30 show_data(samples, "Samples");
31 show_data(samples, "Samples", 6);
32 show_data(samples, "Samples", 8, 4);
33}
34
35void show_data(
36 std::span<const int> data,

Callers

nothing calls this directly

Calls 1

show_dataFunction · 0.70

Tested by

no test coverage detected