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

Function change_it_by_pointer

Examples/Modules/Chapter 08/Ex8_07.cpp:18–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void change_it_by_pointer(double* pit)
19{
20 *pit += 10.0; // This modifies the original double
21}
22void change_it_by_reference(double& pit)
23{
24 pit += 10.0; // This modifies the original double as well!

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected