J
JustSomeGuy
Hi. I have a comma delimited text file that I want to parse.
I was going to use fscanf from the C library but as my app is written
in C++
I thought I'd use the std io stream library...
My Text file looks like:
First_Name, Last_Name, ID, Date/Of/Birth<newline>
depending on the host the newline is either \n or \r\n
so what would I do to input these lines from a file?
std::cin >> firstName >> comma >> lastName >> comma >> ID >> comma >>
dateOfBirth;
The above obviously won't work, but I'm looking for a statement similar
to this to read in the text file.
TIA.
BOB.
I was going to use fscanf from the C library but as my app is written
in C++
I thought I'd use the std io stream library...
My Text file looks like:
First_Name, Last_Name, ID, Date/Of/Birth<newline>
depending on the host the newline is either \n or \r\n
so what would I do to input these lines from a file?
std::cin >> firstName >> comma >> lastName >> comma >> ID >> comma >>
dateOfBirth;
The above obviously won't work, but I'm looking for a statement similar
to this to read in the text file.
TIA.
BOB.