DoubleToStr
DoubleToStr
返回将指定数值转换为指定精度格式的文本字符串。
string DoubleToStr(
double value, // value
int digits // precision
);参数
- value
[in] 浮点数值。
- digits
[in] 精度格式,小数点后的位数(0-8)。
返回值
文本字符串。
示例:
string value=DoubleToStr(1.28473418, 5);
// the value is "1.28473"
参见
最后更新于