Sets the file pointer value to the beginning of the file. This is the same as file::Seek(0, file::begin).
void SeekToBegin( )
EX1
void file_SeekToBegin_ex1() { file ff("C:\\float.txt", file::modeCreate | file::modeWrite); vector<float> vf(5); for ( int ii = 0; ii < vf.GetSize(); ii++ ) vf[ii] = ii*1.25; ff.WriteFloat(vf, sizeof(float), vf.GetSize()); LONG lFileSize = ff.Seek(20, file::begin); // lCurrent = 20. lFileSize = ff.SeekToBegin(); // Go to the beginning of the file. ff.Close(); }
file::GetPosition, file::Seek, file::SeekToEnd
origin.h