Originally Posted by
kacaka
hi,
my code as above, may i ask why there are error c2228 like left of 'seekToEnd' must have class /struct union. the same error appears for 'write' n 'close','writestring',error c2065 lpszfileName undeclared identifier'writestring'.
The variable filename is not defined. ?? may i know hw to define tis.
for point 2
You have to use CFileException to know whether your file operations succeded or not. See the code examples in MSDN articles CFile::Open and CStdioFile::CStdioFile
CFileException Exception;
CFile File;
if(File.Open("c:\\data.txt", CFile::modeRead, &Exception) == FALSE)
{
may i know whether the code is correct .