首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::basic_ios::init

protected: void init( std::basic_streambuf<CharT,Traits>* sb );

?

?

将关联的流缓冲区设置为sb并初始化内部状态。

后条件如下:

Element

Value

rdbuf()

sb

tie()

NULL

rdstate()

goodbit if sb is not NULL, otherwise badbit

exceptions()

goodbit

flags()

skipws | dec

width()

?0?

precision()

6

fill()

widen(' ')

getloc()

a copy of the value returned by std::locale()

这个成员函数是受保护的:它由派生流类的构造函数调用。std::basic_istreamstd::basic_ostream一旦关联的流缓冲区被知道。在调用此函数之前,除默认构造的析构函数%29外,每个成员函数%28。std::basic_ios调用未定义的行为。请注意basic_ios是一个虚拟基类,因此那些直接派生类的构造函数不调用它的构造函数,这就是为什么需要进行两阶段初始化的原因。

参数

sb

-

stream buffer to associate to

另见

(constructor)

constructs the object (public member function)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com