Importing values from a file

hardjalard

Registered
I need to import certain values from a tab delimited text file. I understand I can see the contents of the file as a string, but will searching for a tab or end of line marker be the best way to pick out certain values (if so, how exactly would I do this - which methods would I use)? Or is there a different way to import values from a tab delimited file?


Thanks in advance for your help.
 
You can use C++ iostreams to read from the file - since the default value delimiter is tabs, whitespace, and newlines, you should be able to simply read one value at a time using the >> operator.
 
Back
Top