For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
Describes an object that controls insertion of elements and encoded objects into a stream buffer of class strstreambuf.
class ostrstream : public ostream
The object stores an object of class
|ostrstream||Constructs an object of type |
|freeze||Causes a stream buffer to be unavailable through stream buffer operations.|
|pcount||Returns a count of the number of elements written to the controlled sequence.|
|rdbuf||Returns a pointer to the stream's associated |
|str||Calls freeze, and then returns a pointer to the beginning of the controlled sequence.|
Causes a stream buffer to be unavailable through stream buffer operations.
void freeze(bool _Freezeit = true);
bool indicating whether you want the stream to be frozen.
See strstream::freeze for an example that uses freeze.
Constructs an object of type
ostrstream(); ostrstream(char* ptr, streamsize count, ios_base::openmode _Mode = ios_base::out);
The size of the buffer in bytes.
The input and output mode of the buffer. See ios_base::openmode for more information.
Both constructors initialize the base class by calling ostream( sb), where sb is the stored object of class strstreambuf. The first constructor also initializes sb by calling
strstreambuf. The second constructor initializes the base class one of two ways:
_Mode& ios_base::app== 0, then
ptrmust designate the first element of an array of
countelements, and the constructor calls
ptrmust designate the first element of an array of count elements that contains a C string whose first element is designated by
ptr, and the constructor calls
Returns a count of the number of elements written to the controlled sequence.
streamsize pcount() const;
The number of elements written to the controlled sequence.
See strstream::pcount for a sample that uses
Returns a pointer to the stream's associated strstreambuf object.
strstreambuf *rdbuf() const
A pointer to the stream's associated strstreambuf object.
The member function returns the address of the stored stream buffer of type pointer to strstreambuf.
See strstreambuf::pcount for a sample that uses
Calls freeze, and then returns a pointer to the beginning of the controlled sequence.
A pointer to the beginning of the controlled sequence.
See strstream::str for a sample that uses str.