CArchive与CFile一起的用法、、、
2012-11-01 09:39 龙成 阅读(430) 评论(0) 编辑 收藏 举报读
CFile mFile(path,CFile::modeRead);
CArchive arin(&mFile,CArchive::load);
arin.Flush();
ULONGLONG PosLen = mFile.GetPosition();
ULONGLONG FileLen = mFile.GetLength();
while( PosLen < FileLen)
{
arin >> str;
arin.Flush();
PosLen = mFile.GetPosition();
SeparateFile(str);
}
arin.Close();
mFile.Close();
写
CFile mfile(m_writepath,CFile::modeWrite|CFile::modeCreate);
CArchive ar(&mfile,CArchive::store);
while(WritePathIter != combinefile.FilePathStr.end())
{
ar << *WritePathIter++;
}
ar.Close();
mfile.Close();