首页 > 其他 > 详细

1. std::to_string

时间:2021-01-29 10:40:32      阅读:29      评论:0      收藏:0      [点我收藏+]
Convert numerical value to string

Returns a string with the representation of val.

 

The format used is the same that printf would print for the corresponding type:

 

type of valprintf equivalentdescription
int "%d" Decimal-base representation of val.
The representations of negative values are preceded with a minus sign (-).
long "%ld
long long "%lld
unsigned "%u" Decimal-base representation of val.
unsigned long "%lu
unsigned long long "%llu
float "%f" As many digits are written as needed to represent the integral part, followed by the decimal-point character and six decimal digits.
inf (or infinity) is used to represent infinity.
nan (followed by an optional sequence of characters) to represent NaNs (Not-a-Number).
The representations of negative values are preceded with a minus sign (-).

 

1. std::to_string

原文:https://www.cnblogs.com/unicornsir/p/14343223.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!