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

Function main

data/cpp/04_smart_pointers.cpp:17–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17int main() {
18 auto head = std::make_shared<Node>(1);
19 head->next = std::make_shared<Node>(2);
20 head->next->next = std::make_shared<Node>(3);
21
22 for (auto n = head; n; n = n->next) {
23 std::cout << n->value << " ";
24 }
25 std::cout << "\n";
26
27 auto arr = make_array(5, 7);
28 for (int i = 0; i < 5; i++) {
29 std::cout << arr[i] << " ";
30 }
31 std::cout << "\n";
32 return 0;
33}

Callers

nothing calls this directly

Calls 1

make_arrayFunction · 0.70

Tested by

no test coverage detected