引用第1楼xtfllbl于2010-04-19 14:49发表的 :
用qfile吧,mfc是micro那套东西,这里水土不服。
关键是我用ifstream重写以前的mfc代码,结果和CFile获取到得数据不一样。
unsigned long Project_ID=0;
file.seekg(-(int)sizeof(Project_ID),ios::end);
file.read((char *)(&Project_ID), sizeof(Project_ID));
cout<<"project id: "<<Project_ID<<endl;
CFiel Proj;
Proj.Seek(-(int)sizeof(Project_ID),CFile::end); //Read the project flag at the end of the file
Proj.Read(&Project_ID,sizeof(Project_ID));
Project_ID不一样。