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

Function main

Exercises/NoModules/Chapter 10/Soln10_04.cpp:35–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33*/
34
35int main()
36{
37 int array[] {4, 8, 15, 16, 23, 42};
38 std::cout << "Size of numbers is " << my_size(array) << std::endl;
39
40 // A string literal is also an array:
41 std::cout << "Size of life lesson is "
42 << my_size("Always wear a smile. One size fits all.") << std::endl;
43
44 std::vector<int> vector{4, 8, 15, 16, 23, 42};
45 std::cout << "Size of vector is " << my_size(vector) << std::endl;
46
47 std::array<int, 6> array_object{4, 8, 15, 16, 23, 42};
48 std::cout << "Size of array_object is " << my_size(array_object) << std::endl;
49}

Callers

nothing calls this directly

Calls 1

my_sizeFunction · 0.70

Tested by

no test coverage detected