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

Function main

Examples/NoModules/Chapter 08/Ex8_04.cpp:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4double changeIt(double* pointer_to_it); // Function prototype
5
6int main()
7{
8 double it {5.0};
9 double result {changeIt(&it)}; // Now we pass the address
10
11 std::cout << "After function execution, it = " << it
12 << "\nResult returned is " << result << std::endl;
13}
14
15// Function to modify an argument and return it
16double changeIt(double* pit)

Callers

nothing calls this directly

Calls 1

changeItFunction · 0.70

Tested by

no test coverage detected