- writing to a file mfc
- CString strFileContent;
- CString strFilePath;
- CFile theFile(strFilePath, CFile::modeReadWrite | CFile::modeCreate);
- // write BOM if you like
- // WCHAR bom = 0xFEFF;
- // theFile.Write(&bom, 2);
- theFile.Write( (LPCTSTR) strFileContent,
- strFileContent.GetLength() * sizeof(TCHAR));