用CArchive打开一个文件...
我用CArchive打开一个文件,
开始正确,后来就读不出来了!
是不是用的不对呀?
请高手指点!
CFile file;
file.Open(Listpath,CFile::modeRead);
CString str;
CArchive ar(&file,CArchive::load);
do
{
file.Seek(str.GetLength(),CFile::current);
ar.ReadString(str);
AfxMessageBox(str);
}
while(str.GetLength());
ar.Close();
file.Close();