CFile::Write
Visual Studio 2008
Writes data from a buffer to the file associated with the CFile object.
virtual void Write( const void* lpBuf, UINT nCount );
CFile cfile; cfile.Open(_T("Write_File.dat"), CFile::modeCreate | CFile::modeReadWrite); char pbufWrite[100]; memset(pbufWrite, 'a', sizeof(pbufWrite)); cfile.Write(pbufWrite, 100); cfile.Flush();
In addition, see the examples for CFile::CFile and CFile::Open.