std::ostrstream::rdbuf - cppreference.com (original) (raw)
| I/O manipulators |
|---|
| Print functions (C++23) |
| C-style I/O |
| Buffers |
| basic_streambuf |
| basic_filebuf |
| basic_stringbuf |
| basic_spanbuf(C++23) |
| strstreambuf(C++98/26*) |
| basic_syncbuf(C++20) |
| Streams |
| Abstractions |
| ios_base |
| basic_ios |
| basic_istream |
| basic_ostream |
| basic_iostream |
| File I/O |
| basic_ifstream |
| basic_ofstream |
| basic_fstream |
| String I/O |
| basic_istringstream |
| basic_ostringstream |
| basic_stringstream |
| Array I/O |
| basic_ispanstream(C++23) |
| basic_ospanstream(C++23) |
| basic_spanstream(C++23) |
| istrstream(C++98/26*) |
| ostrstream(C++98/26*) |
| strstream(C++98/26*) |
| Synchronized Output |
| basic_osyncstream(C++20) |
| Types |
| streamoff |
| streamsize |
| fpos |
| Error category interface |
| iostream_category(C++11) |
| io_errc(C++11) |
| Member functions |
|---|
| ostrstream::ostrstream |
| ostrstream::~ostrstream |
| ostrstream::rdbuf |
| ostrstream::str |
| ostrstream::freeze |
| ostrstream::pcount |
| strstreambuf* rdbuf() const; | | (deprecated in C++98) (removed in C++26) | | ----------------------------- | | ---------------------------------------- |
Returns a pointer to the associated std::strstreambuf, casting away its constness (despite the const qualifier on the member function).
[edit] Parameters
(none)
[edit] Return value
Pointer to the associated std::strstreambuf, with constness cast away.
[edit] Example
Run this code
#include int main() { const std::ostrstream buf; std::strstreambuf* ptr = buf.rdbuf(); }