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