MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / make_array

Function make_array

data/cpp/04_smart_pointers.cpp:11–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9};
10
11std::unique_ptr<int[]> make_array(int n, int fill) {
12 auto arr = std::make_unique<int[]>(n);
13 for (int i = 0; i < n; i++) arr[i] = fill;
14 return arr;
15}
16
17int main() {
18 auto head = std::make_shared<Node>(1);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected