|
-
May 2nd, 1999, 05:24 PM
#1
File processing
Hi,
I'm having trouble getting the right code to iterate through a file on disk. The file
-
May 3rd, 1999, 03:36 PM
#2
Re: File processing
Hi,
Need more info. Explain what you are trying to do...
What are the vars declared as (I'm assuming CString and CStringList...).
Maybe use CStdioFile instead of CFile. It can read in a line of text at a time (assuming you have text files with \n's ).
If you use a CStdioFile, iterate like this
for( ; ; ) // open loop
{
if(!mystdiofile.Read(szInBuffer))
break; // eof (read returns number of chars read.... i think)
m_aMyStringList.AddTain(szInBuffer);
}
HTH,
Harvey Hawes
Software Engineer
BioScience Analysis Software Ltd.
Masters Candidate
Cardiovascular/Respiratory Sciences
Faculty of Medicine
University of Calgary
Calgary, Alberta, Canada
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
|