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

Function fillVector_1toN

Examples/NoModules/Chapter 20/Ex20_14/Ex20_14.cpp:33–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected