|
-
June 8th, 1999, 01:30 AM
#1
File I/O
Hey.
I have a tab-delimited text-file with entries i want to read from. The data consists of two strings per post which i want to read and then manipulate with. What functions is best to use?
A record could look like this:
Accolade <tab> Something_generic_here
etc..
Thanks!
C B
-
June 8th, 1999, 01:41 AM
#2
Re: File I/O
Use CStdioFile. Construct it (no parameters), use its Open() method with the filename and CFile::modeRead|CFile::typeText as the attributes, then use its ReadString() method to read the line as a CString. Use CString's TrimRight() to remove the trailing <CR><LF>. Then use CString's Find() method to locate the index of the <TAB> ('\t'), and use CString's Left() and Right() methods to split the line into its two halves.
Does this help?
-
June 8th, 1999, 01:52 AM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|