CFile testFile(_T("test.dat"), CFile::modeWrite);
CArchive arSave(&testFile, CArchive::store);
arSave << _T("SoBe") << 6655;
arSave.Close();
testFile.Close();

CString str = _T("");
int n = 0;

testFile.Open(_T("test.dat"), CFile::modeRead);
CArchive arLoad(&testFile, CArchive::load);
arLoad >> str >> n;
arLoad.Close();
testFile.Close();

先看看这段代码,不知道你有什么感觉呢?

在你还没有动手打开IDE进行调试前,你认为这段代码有没有什么问题?

如果有问题,那又是什么问题呢?

望各位大牛不吝赐教啊~~~

相关文章:

  • 2021-09-07
  • 2022-02-14
  • 2021-09-12
  • 2022-12-23
  • 2021-06-28
  • 2021-11-16
  • 2022-12-23
猜你喜欢
  • 2022-03-01
  • 2021-07-04
  • 2022-12-23
  • 2021-11-01
  • 2021-08-26
  • 2021-04-23
  • 2021-06-14
相关资源
相似解决方案