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