Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic


Forces any data remaining in the archive buffer to be written to the file.

void Flush( );


The member function Flush ensures that all data is transferred from the archive to the file. You must call CFile::Close to complete the transfer from the file to the storage medium.


CFile myFile("myfile.dat", CFile::modeCreate | CFile::modeWrite);
CArchive ar(&myFile, CArchive::store);

// Write a string to the archive.
ar.WriteString( "My string." );

// Flush all of the data to the file.

See Also

CArchive Overview | Class Members | Hierarchy Chart | CArchive::Close | CFile::Flush | CFile::Close

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.