Next: Exercises
Up: Further User-defined functions in
Previous: Summary
void change(int& y) { y = 1; } void main() { int x; x = 0; change(x); cout << x << endl; }
int
and returns true if these two integers are a
valid value for a sum of money in pounds and pence. If they are valid
then the value of the sum of money should also be returned in pence
(without affecting the input value of pence). If not valid then
false should be returned.