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

Function fillVector_1toN

Examples/NoModules/Chapter 20/Ex20_10/Ex20_10.cpp:34–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34std::vector<int> fillVector_1toN(size_t N)
35{
36 std::vector<int> numbers;
37 for (int i{ 1 }; i <= N; ++i)
38 numbers.push_back(i);
39 return numbers;
40}
41
42void printVector(std::string_view message, const std::vector<int>& numbers)
43{

Callers 1

mainFunction · 0.70

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected