How can I go about detecting a space OR another specific character/symbol in one line of a file using the fstream library?
For example, the text file would look like this:
Dog Rover
Cat Whiskers
Pig Snort
I need the first word to go into one variable, and the second word to go into another separate variable. This should happen for every line in the text file.
Any suggestions?