std::istrstream::rdbuf

来自cppreference.com
< cpp‎ | io‎ | istrstream
strstreambuf* rdbuf() const;
(C++98 弃用)
(C++26 移除)

返回指向关联 std::strstreambuf 的指针,转型掉其常性(无关乎成员函数上的 const 限定符)。

[编辑] 参数

(无)

[编辑] 返回值

指向关联 std::strstreambuf 的指针,常性被转型掉。

[编辑] 示例

#include <strstream>
 
int main()
{
    const std::istrstream buf("example");
    std::strstreambuf* ptr = buf.rdbuf();
}