How to declare a global input stream
After many many hours of agonising debugging, I've found I need to declare one of my input streams globally.
I'm loading up a .txt file and need to have 2 functions have access to it. I would rather pass a pointer (to the stream) to my function but I'm not very confident the pointers and my brain has been jellyfied.
So any tips on how to declare it globally, so far I have:
Any help for either method would really, really be appreciated
int process_stream(char ch)
while(instream.get(ch) && isalnum(ch))
word += ch;