I want to start by saying I did use the search function and I did read the fstream tutorial. But I didn't see the answer I need.
I have been given a text file for which I need to read input from. Here is a partial listing of the file...
BAK 90001 200 TXT N
CRSC 90010 150 TXT N
MARY 90011 140 FP N
CARL240 90050 300 FP N
LOW236 90052 150 FP N
The file contains four columns which need to be put into different members of the class. For example, how can I read the first line and put "BAK" into member0, "90001" into member1, "200" into member2, "TXT" into member3 and "N" into member four?
Also, after reading the first line, I need to stop reading the file to perform some functions then continue reading the file on the next line. This repeats until all the lines are read.
Any help is greatly appreciated! :confused: