1/24/00
COM1100 Winter2000 Lecture 7
20
Method 2 -- Example
nvoid Increment(int& n); // function declaration 
nvoid Increment(int& n){ // function definition
n n = n+1;
n };
nint main() {
n int x = 25;
n cout << x << " ~~~ ";
n Increment(x);
n cout << x << endl;
n return 0;
n}
n// this will print 25 ~~~ 26
n
n