CodePudding user response:
The entire file to be read to come in, and then find themselves need to contentCodePudding user response:
Read the file content, and then their resolutionCodePudding user response:
CFile: : SeekVirtual LONG Seek (LONG lOff, UINT nFrom);
Throw (CFileException);
The Return Value
If the requested position is legal, Seek returns the new byte offset from the beginning of the file. Otherwise, the return value is undefined and a CFileException object is thrown.
The Parameters
LOff
Number of bytes to move the pointer.
NFrom
Pointer movement mode. Must be one of the following values:
CFile: : begin Move the file pointer lOff bytes forward from the beginning of the file.
CFile: : the current Move the file pointer lOff bytes from the current position in the file.
CFile: : end Move the file pointer lOff bytes from the end of the file. Note that lOff must be negative to the seek into the existing file. Positive values will seek past the end of the file.
Few
Repositions the pointer in a previously the opened file. The Seek function permits the random access to a file's contents by moving the pointer a specified amount, absolutely or relatively. No data is later read during the Seek.
When a file is the opened, the file pointer is positioned at offset 0, the beginning of the file.
Example
//example for CFile: : Seek
Extern CFile CFile;
LONG lOffset=1000, lActual;
LActual=cfile. Seek (lOffset cfile: : begin);
CFile Overview | Class Members | Hierarchy Chart
CodePudding user response: