Flush
Force data remaining in the file buffer to be written to the file.
BOOL Flush( )
TRUE for success and FALSE for error.
EX1
void file_Flush_ex1() { string strFile = "C:\\test.txt"; file ff; if( ff.Open(strFile, file::modeCreate | file::modeWrite) ) { LPCSTR lpczFile = strFile; ff.Write(&lpczFile, strFile.GetLength()); // Write the file name into the file. ff.Flush(); // Make sure the file buffer has been written into the file. ff.Close(); } }
file::Write
origin.h