std::ostrstream:: rdbuf
From cppreference.net
<
cpp
|
io
|
ostrstream
C++
Input/output library
| I/O manipulators | ||||
| Print functions (C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(C++20)
|
||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
| Synchronized Output | ||||
|
(C++20)
|
||||
| Types | ||||
| Error category interface | ||||
|
(C++11)
|
||||
|
(C++11)
|
std::ostrstream
| Member functions | ||||
|
ostrstream::rdbuf
|
||||
|
strstreambuf
*
rdbuf
(
)
const
;
|
(C++98 中已弃用)
(C++26 中移除) |
|
返回指向关联的 std:: strstreambuf 的指针,同时去除其常量性(尽管成员函数带有 const 限定符)。
参数
(无)
返回值
指向关联的 std:: strstreambuf 的指针,已移除常量性。
示例
运行此代码
#include <strstream> int main() { const std::ostrstream buf; std::strstreambuf* ptr = buf.rdbuf(); }