next up previous contents
Next: Command Input Streams (cmd_istream) Up: Simple Data Types and Previous: String Input Streams (string_istream)

   
String Output Streams (string_ostream)

Definition

An instance O of the data type string_ostream is an C++ostream connected to an internal string buffer, i.e., all output operations or operators applied to O write into this internal buffer. The current value of the buffer is called the contents of O.

Creation

string_ostream O; creates an instance O of type string_ostream.

   

Operations

string O.str() returns the current contents of O.

All operations and operators (<<) defined for C++ostreams can be applied to string output streams as well.



LEDA research project
1998-10-02