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

std::basic_filebuf::overflow

protected: virtual int_type overflow ( int_type c = Traits::eof() );

?

?

将一些数据从PUT区域写入关联字符序列%28到文件%29。

行为类似于基类。std::basic_streambuf::overflow,除了写入数据,首先使用std::codecvt::out将字符转换为外部的%28---可能是多字节%29---表示的区域设置,存储在临时缓冲区%28中,根据需要分配%29,然后使用文件I/O将所有完全转换的字节复制到文件中。

如果std::codecvt::always_noconv是真的,调用std::codecvt::out可能会被跳过。

如果转换失败,则使用std::codecvt_base::error、回报Traits::eof()而不尝试任何输出。

如果关联文件未打开%28is_open() == false%29,回报Traits::eof()在做任何事之前。

参数

%280%29

返回值

Traits::not_eof(c)表示成功或Traits::eof()表示失败。

另见

overflow virtual

writes characters to the associated output sequence from the put area (virtual protected member function of std::basic_streambuf)

underflow virtual

reads from the associated file (virtual protected member function)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com