目录

pbackfail

描述 (Description)

它用于将字符放回并将get指针(gptr)移回一个位置以指向前一个字符,如果basic_stringbuf对象是使用ios_base :: out构造的,则将c存储在该位置。

声明 (Declaration)

以下是std :: basic_stringbuf :: pbackfail的声明。

int_type pbackfail (int_type c = traits_type::eof());

参数 (Parameters)

c要放回的字符。

返回值 (Return Value)

它在成功时返回traits_type :: not_eof(c)或在失败时返回文件结束值。

异常 (Exceptions)

Basic guarantee - 如果抛出异常,则对象处于有效状态。

数据竞争 (Data races)

它修改basic_stringbuf对象。

↑回到顶部↑
WIKI教程 @2018