ostrstream();
ostrstream( char* pch, int nLength, int nMode = ios::out );
pch
A character array that is large enough to accommodate future output stream activity.
nLength
The size (in characters) of pch. If 0, then pch is assumed to point to a null-terminated array and strlen( pch ) is used as the length; if less than 0, then the array is assumed to have infinite length.
nMode
The stream-creation mode. Must be one of the following enumerators as defined in class ios:
Value | Meaning |
ios::out | Default; storing begins at pch |
ios::ate | The pch parameter is assumed to be a null-terminated array; storing begins at the NULL character |
ios::app | Same as ios::ate |
The first constructor makes an ostrstream object that uses an internal, dynamic buffer.
The second constructor makes an ostrstream object out of the first nLength characters of the pch buffer. The stream will not accept characters once the length reaches nLength.