What you need to understand is that, given what you have seen so far , there is no way to change a variable contained in one function through an instruction executed in another function - except via the 'return' instruction. And, since the 'return' instruction only allows one value to be returned, we seem to be stuck with regard to the 'GetEmployeeInformation' function. There is, however, a solution. As a matter of fact, as we just noted, there are no longer two variables - two separate memory locations with the symbolic name 'rateOfPay'. Instead, there is one memory location with two symbolic names.
Information can move both ways.
Technically, one can return two values by having one value returned via the 'return' instruction and the second returned via a formal parameter declared with an ampersand. Many software engineers, however, don't approve of this. They feel that when you are returning two values of the same kind as in two pieces of information about an employee you should declare two formal parameters with the ampersand and declare the function itself with 'void' for the return type. That is what we will do with the function 'GetEmployeeInformation'. We have a two way street where in one direction garbage is sent.