1,658
社区成员




try
{
CFile file(_T("F:\\11.txt"), CFile::modeRead);
DWORD dwSize = file.GetLength();
char* buf = new char[dwSize + 1];
memset(buf, 0, sizeof(char) * (dwSize + 1));
file.Read(buf, dwSize);
file.Close();
CString strText(buf);
for(int i=0; i<strText.GetLength(); i+=2)
{
CString strTmp = strText.Mid(i, 2);
int nVal = _ttoi(strTmp); //这里就是你需要的数据
}
delete[] buf;
buf = NULL;
}
catch (CException* e)
{
e->ReportError();
e->Delete();
}