The template class basic_ostringstream is derived from basic_ostream and used to associate output streams with an object of class basic_string.
The class basic_ostringstream uses an object of type basic_stringbuf to control the associated storage.