-
March 25th, 2011, 06:14 AM
#16
Re: Reading Text line from .txt File
hypheni : Can you tell me any which is related to the Windows Programming.?
Iwil be very very thankful to you
VictorN: Thanks Buddy so nice of you
-
March 25th, 2011, 06:35 AM
#17
Re: Reading Text line from .txt File
Any what book ?.
then start off with this.
◄◄ hypheni ►►
-
March 25th, 2011, 07:09 AM
#18
Re: Reading Text line from .txt File
Originally Posted by adnan86
CStdioFile inFile;
CFileException efile;
CString strFirstLine;
inFile.Open("test.txt",CFile::modeRead|CFile::typeText);
inFile.ReadString(strFirstLine);
m_List1.AddString(inFile);
am doing this , but giving me error
Nevertheless, it's still the best approach. Getting and fixing errors is part of programming. Why are you passing a CStdilFile to your list? The compiler probably told you exactly what was wrong.
You're still just guessing and that still isn't working for you.
Last edited by GCDEF; March 25th, 2011 at 07:12 AM.
-
March 26th, 2011, 03:27 PM
#19
Re: Reading Text line from .txt File
Hey, why not try CFile ? Cstdiofile is different from cfile
-
March 26th, 2011, 03:31 PM
#20
Re: Reading Text line from .txt File
Originally Posted by Sharpie
Hey, why not try CFile ? Cstdiofile is different from cfile
How would that help in this situation?
-
March 26th, 2011, 03:57 PM
#21
Re: Reading Text line from .txt File
Originally Posted by Sharpie
Hey, why not try CFile ? Cstdiofile is different from cfile
1. Yes. CStdioFile is different from CFile, however, it is derived from CFIle.
2. None of CFile methods takes CString as a parameter, however CStdioFile::ReadString and CStdioFile::WriteString do. And it is what OP needs!
Victor Nijegorodov
Tags for this Thread
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
|