寻求帮助,善良的人进!
为什么我把程序改成这样就不能用了啊?
CFile MyFile;
char* buf=new char[1];
MyFile.Open("test.txt",CFile::modeRead);
MyFile.Read((void*)&buf,1);//只读取3位
MyFile.Close();
CString strOutput;
strOutput.Format("%d",atoi(buf));
pDC->TextOut(0,0,strOutput);
test.txt文件内容如下:3
有人能帮我吗??
万分感谢。。祝帮助我的好人万事如意中秋快乐!