I am parsing an input text file. If I grab the input one line at a time using getline(), is there a way that I can search through the string to get an integer? I was thinking something similar to getNextInt() in Java.
I know there has to be 2 numbers in that input line; however, these values will be separated by one or more white space characters, so I can’t just go to a specific position.
If the only thing in there is whitespace and integers, just try something like this:
or easier: