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