请高手分析这段数据存储代码的错误!急!
{mm_43.Format("%.2f",CaO);x1=mm_43;
mm_44.Format("%.2f",m_3);
x2=mm_44;
mm_45.Format("%.2f",FeO);
x3=mm_45;
mm_46.Format("%.2f",m_53);
x4=mm_46;
mm_47.Format("%.2f",m_10);
x5=mm_47;
mm_48.Format("%.4f",outMn);
x6=mm_48;
mm_49.Format("%.2f",mx07);
x7=mm_49;
mm_50.Format("%.2f",m_56);
x8=mm_50;
mm_51.Format("%.2f",m_57);
x9=mm_51;
UpdateData(FALSE);
OnOK();
}
void CMy08Dlg::OnOK()
{
UpdateData();
CFile mFile;
mFile.Open("Dataout1.txt", CFile::modeWrite|CFile::modeCreate);
mFile.Write(x1,10);
mFile.Write("\r\n",2);
mFile.Write(x2,10);
mFile.Write("\r\n",2);
mFile.Write(x3,10);
mFile.Write("\r\n",2);
mFile.Write(x4,10);
mFile.Write("\r\n",2);
mFile.Write(x5,10);
mFile.Write("\r\n",2);
mFile.Write(x6,12);
mFile.Write("\r\n",2);
mFile.Write(x7,10);
mFile.Flush();
mFile.Close();
OnCancel();
UpdateData(FALSE);
}
问题:一旦写入的数据大于100,比如100.45,生成的文件换行就不能成功了,中间还夹有“?”号!!!