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

Function main

Examples/Modules/Chapter 16/Ex16_07B/Ex16_07B.cpp:11–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9double* computeValues(size_t howMany); // A function to compute an array of values
10
11int main()
12{
13 try
14 {
15 double* values{ computeValues(10'000) };
16 // Unfortunately we won't be making it this far...
17 delete[] values;
18 }
19 catch (const Trouble&)
20 {
21 std::cout << "No worries: I've caught it!" << std::endl;
22 }
23}
24
25double* computeValues(size_t howMany)
26{

Callers

nothing calls this directly

Calls 1

computeValuesFunction · 0.70

Tested by

no test coverage detected