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

Function printSet

Examples/NoModules/Chapter 20/Ex20_03/Ex20_03.cpp:30–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void printSet(const std::set<int>& my_set)
31{
32 std::cout << "There are " << my_set.size() << " elements in my_set: ";
33 for (int element : my_set) // A set, like all containers, is a range
34 std::cout << element << ' ';
35 std::cout << std::endl;
36}

Callers 1

mainFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected