My programming skills are rusty after too much time away, and I am having a hard time figuring out the best way to do this.
I am working on a scanner and I want to read the file name from the command prompt within main. Then I want to call scanner() repeatedly to produce tokens. Scanner will be in a separate scanner.cpp file. What is the best way to do this in order to save the position of the file as I go in and out of the function? Who should actually read the file - main or scanner? It seems that scanner should, but I am a little hazy on how to do this.