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
Re: Reading Text line from .txt File
Any what book ?.
then start off with this.
Re: Reading Text line from .txt File
Quote:
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.
Re: Reading Text line from .txt File
Hey, why not try CFile ? Cstdiofile is different from cfile
Re: Reading Text line from .txt File
Quote:
Originally Posted by
Sharpie
Hey, why not try CFile ? Cstdiofile is different from cfile
How would that help in this situation?
Re: Reading Text line from .txt File
Quote:
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!