Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ fillSet_1toN
Function
fillSet_1toN
Examples/Modules/Chapter 20/Ex20_13/Ex20_13.cpp:24–30 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
22
}
23
24
std::set<int> fillSet_1toN(size_t N) // Fill a set with 1, 2, ..., N
25
{
26
std::set<int> numbers;
27
for (int i{ 1 }; i <= N; ++i)
28
numbers.insert(i);
29
return numbers;
30
}
31
32
void printVector(const std::vector<int>& v)
33
{
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected