直接使用MFC的WriteString函数就可以了,如:
CStdioFile file;
CString x,y,z,str;
if(!file.Open((LPCTSTR)FileName_path,CFile::modeCreate|CFile::modeReadWrite|
CFile::shareDenyNone))
{
uc1601("open file error",1);
return-1;
}
.
.
.
str=x+" "+y+" "+z;//要确保x,y,z已经转换成CString类型的变量了
file.WriteString( str); |