Below is the major portion of the original post. Quzah responded to my questions but I still cannot make the program work. I have modified it (attached) but it now has 20+ errors and 40+ warnings. I know how to open files. My biggest problem is that I want to open the file in a separate function and then call it from other functions but cannot determine how to pass the pointer. If anyone can help, please view the attached program and pass comments.
Passing data/pointers between functions
I have just started working with functions. I am trying to clarify how to pass data between these functions without declaring global variables. I am also trying to discover how to pass file pointers between functions.
The code I attached below opnes 3 files. If I wanted to open these 3 files in a separte function (say will call it "open_files).
In the stock_report function, I want to call the open files function. How do I pass the file pointer into the stock_report function so that I can use the open_files function?