CFile f; f.Open("1.txt",CFile::modeCreate|CFile::modeWrite); f.SeekToEnd(); CArchive ar(&f,CArchive::store); ar<<s_strs; ar.Close(); f.Close();
f.Open("1.txt",CFile::modeCreate|CFile::modeWrite);
CFile f; if(!f.Open("1.txt",CFile::modeWrite)){ f.Open("1.txt",CFile::modeCreate|CFile::modeWrite); MessageBox("文件不存在,将创建!");} f.SeekToEnd(); CArchive ar(&f,CArchive::store);