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

Function changeIt

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

Function that attempts to modify an argument and return it

Source from the content-addressed store, hash-verified

14
15// Function that attempts to modify an argument and return it
16double changeIt(double it)
17{
18 it += 10.0; // This modifies the copy
19 std::cout << "Within function, it = " << it << std::endl;
20 return it;
21}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected