Hello this is for my assignment for college. I just need help on how to properly declare ofstream/ifstream globally to get my program to work the proper way. Yes I know I can just declare it in Main() and use pass by reference. ( Did that on the first project this semester) But it was suggested I used it as a Global declaration instead. And it is written down in the instructions of this new assignment to do so.
I've tried searching through google, going through my c++ textbook. But I can't find a good example of using ofstream/ifstream globally to satisfy all of my functions outside of main that need to either read/write or both from text files.
Edit: I need to Declare ofstream/ifstream globally and also open them globally.
Thanks!