Hi all,
I want to find the end of file in a CFile. What I've do up to now is, find the length of the file in bytes. Then do the required process with the number of bytes. Here is the code,
int length = 0 ;
CString str
length = srf_ReadFile.GetLength()/sizeof(TCHAR) ;
str.Format(_T("File size is %d bytes long."), length) ;
AfxMessageBox(str, MB_OK) ;
My question is there is any simple way to do it. I know on fstream I can do it within one statement, like this.
while(!fileopen.eof())