+ -
当前位置:首页 → 问答吧 → 有没有人解释下这段话?

有没有人解释下这段话?

时间:2011-12-20

来源:互联网

ios_base::fmtflags AcctABC::SetFormat()const
{
//set up ###.##format
ios_base::fmtflags initialState=
cout.setf(ios_base::fixed,ios_base::floatfield);
cout.setf(ios_base::showpoint);
cout.precision(2);
return initialState;
}
看不懂,具体的解释下;

作者: xuefeng7260   发布时间: 2011-12-20

自己查msdn吧,应该是生成一个format的实例把。。浮点数,精度小数点后2,显示小数点

作者: bobye1230   发布时间: 2011-12-20