//保存文件
CFile f;
CFileFind ff;
CString sFile ="d:\\aaa.txt" ;
if(!ff.FindFile(sFile, 0))
{
f.Open(sFile.GetBuffer(1),CFile::modeCreate,NULL);
f.Close();
}
f.Open(sFile.GetBuffer(1),CFile::modeReadWrite);
CString sText="aaaaaaaabbbbbbcccccc";
//写入数据
f.Write((void*)sText.GetBuffer(1), sText.GetLength());
f.Close();
ff.Close();
评论