大侠求指导下!关于format的问题!怎么搞也不能输给数值

Item.szText.Format("%.3f",pDoc->m_edt_top[m_text][row-1] );Item.szText.Format("%.3f",pDoc1->m_edt_top[m_text+1][row-a] );

你那个变量是float类型吗。

调试,下断点,看m_edt_top[m_text][row-1]有没有值。

我的变量是double类型的
m_edt_top[m_text][row-1]有值的

什么值,贴图
Item.szText.Format("%.3f",pDoc->m_edt_top[m_text][row-1]);
然后呢,你把结果赋给什么地方了?

CString stemp = Item.szText.Format("%.3f",pDoc->m_edt_top[m_text][row-1]);
在这里下断点,看stemp是多少