Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

ostrstream


ostrstreaminherits frombasic_ostreaminherits frombasic_iosinherits fromios_base

Summary

Writes to an array in memory.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <strstream> 
class ostrstream
: public basic_ostream<char>

Description

The class ostrstream writes to an array in memory. It uses a private strstreambuf object to control the associated array object. It inherits from basic_ostream<char> and therefore can use all the formatted and unformatted output functions.

This is a deprecated feature and might not be available in future versions.

Interface

Types

char_type
int_type
off_type
pos_type
traits

Constructors

ostrstream();
ostrstream(char* s, int n, ios_base::openmode
           mode = ios_base::out); 

Destructors

virtual ~ostrstream();

Member Functions

void 
freeze(bool freezefl = 1); 
int
pcount() const; 
strstreambuf* 
rdbuf() const; 
char* 
str();

Example

See strstream, istrstream and strstreambuf examples.

See Also

char_traits(3C++), ios_base(3C++), basic_ios(3C++), strstreambuf(3C++), istrstream(3C++), strstream(3C++)

Working Paper for Draft Proposed International Standard for Information Systems--Programming Language C++, Annex D Compatibility features Section D.6.3

Standards Conformance

ANSI X3J16/ISO WG21 Joint C++ Committee



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998