CString str;
int n = 3;
float f = 3.1415926;
str.Format(_T("%%.%df"), n);
str.Format((LPCTSTR)str, f);
c++ 使用变量控制小数点位数
最新推荐文章于 2022-12-11 01:01:36 发布
CString str;
int n = 3;
float f = 3.1415926;
str.Format(_T("%%.%df"), n);
str.Format((LPCTSTR)str, f);