Okay, I did this for both functions that required passing the variables by reference. Thank you for pointing that out to me.

While there are no errors that coming up when I compile the program. It is not running correctly. The program stops running before the external file is open. Does fp have to be pass by reference as well?