ostrstream

ostrstream is the class that specializes ostream to use a strstreambuf for insertion into arrays of characters in memory. You can create an ostrstream object by associating the object with a previously allocated array of characters. You can then write to it and apply other operations to it just as you would to another type of stream.

Class header file: strstream.h