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

Function main

Examples/NoModules/Chapter 16/Ex16_07/Ex16_07.cpp:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

computeValuesFunction · 0.70

Tested by

no test coverage detected