std::basic_streambuf<CharT,Traits>::pubseekpos, std::basic_streambuf<CharT,Traits>::seekpos
来自cppreference.com
< cpp | io | basic streambuf
| pos_type pubseekpos( pos_type pos, ios_base::openmode which = ios_base::in | ios_base::out ); |
(1) | |
| protected: virtual pos_type seekpos( pos_type pos, |
(2) | |
设置输入和/或输出序列的位置指示器为绝对位置。
1) 调用最终导出类的 seekpos(pos, which)
2) 此函数的基类版本无效果。导出类可覆写此函数以允许位置指示器的绝对寻位。
参数
| pos | - | 要设置位置指示器到的绝对位置。 | ||||||||
| which | - | 定义输入和/或输出序列何者有效果。它能为下列常量之一或其组合:
| ||||||||
返回值
1) seekpos(pos, which) 的返回值
2) 位置指示器所定义的结果绝对位置。基类版本返回 pos_type(off_type(-1)) 。
示例
| 本节未完成 原因:暂无示例 |
参阅
| 调用 seekoff() (公开成员函数) |