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进行调试前,你认为这段代码有没有什么问题?

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

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

作者: 烧炳 发表于 2011-03-14 14:39 原文链接

推荐.NET配套的通用数据层ORM框架:CYQ.Data 通用数据层框架