| 5 | void change_it_by_reference(double& reference_to_it); // Pass by reference |
| 6 | |
| 7 | int main() |
| 8 | { |
| 9 | double it {5.0}; |
| 10 | |
| 11 | change_it_by_pointer(&it); // Now we pass the address |
| 12 | std::cout << "After first function execution, it = " << it << std::endl; |
| 13 | |
| 14 | change_it_by_reference(it); // Now we pass a reference, not the value! |
| 15 | std::cout << "After second function execution, it = " << it << std::endl; |
| 16 | } |
| 17 | |
| 18 | void change_it_by_pointer(double* pit) |
| 19 | { |
nothing calls this directly
no test coverage detected