next up previous contents index
Next: Random Sources ( random_source Up: Simple Data Types and Previous: String Input Streams (   Contents   Index


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.

#include < LEDA/system/stream.h >

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.