首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

请教怎么不四设五入显示

2013-08-29 
请问如何不四设五入显示CString stempunsignd int i 256stemp.Format(_T(%.3f),i)stemp显示0.000.

请问如何不四设五入显示
CString stemp;
unsignd int i = 256;
stemp.Format(_T("%.3f"),i);
stemp显示0.000. 请问如何不四设五入显示0.256
[解决办法]

CString stemp;
unsigned int i = 256;
stemp.Format(_T("%.3f"), (double)i/1000);

???

热点排行