The Microsoft Input/Output Stream Classes (iostream.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
class ostrstream
ostream                                     Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  Description
 
  The ostrstream class supports output streams that have character arrays
  as a destination. You can allocate a character array prior to
  construction, or the constructor can internally allocate an expandable
  array. All the ostream operators and functions can then be used to fill
  the array.
 
  You must be aware that there is a put pointer working behind the scenes
  in the attached strstreambuf class. This pointer advances as you insert
  fields into the stream's array. The only way you can make it go
  backwards is to use the ostream::seekp function. If the put pointer
  reaches the end of user-allocated memory (and sets the ios::eof flag),
  then you must call clear before seekp.
 
  #include <strstrea.h>
 
  See Also
 
  strstreambuf, streambuf, strstream, istrstream
 
  Public Members
 
  Construction/Destruction
 
  ostrstream   Constructs an ostrstream object.
 
  ~ostrstream   Destroys an ostrstream object.
 
  Other Functions
 
  pcount   Returns the number of bytes that have been stored in the
             stream's buffer.
 
  rdbuf    Returns a pointer to the stream's associated strstreambuf
             object.
 
  str      Returns a character array pointer to the string stream's
             contents and freezes the array.
 
 
                                     -♦-