作者:当个谎言家很不错非 | 来源:互联网 | 2022-12-06 21:28
什么是默认格式,当我写一个双倍的stringstream
?
double v = 3.0;
std::stringstream ss;
ss <
我在哪里可以找到一个默认格式设置列表stringstream
?std::istream
(在stdlib中)的所有派生类的默认格式是否相同?
1> NathanOliver..:
std::basic_ios::init
对于从中派生的所有流,默认设置由和设置相同ios_base
.默认值为:
rdbuf() sb
tie() 0
rdstate() goodbit if sb is not a null pointer, otherwise badbit.
exceptions() goodbit
flags() skipws | dec
width() 0
precision() 6
fill() widen(’ ’)
getloc() a copy of the value returned by locale()
iarray a null pointer
parray a null pointer
所以默认精度是6