<sstream>

<sstream>

namespace std {
    template<class E,
        class T = char_traits<E>,
        class A = allocator<E> >
        class basic_stringbuf;
    typedef basic_stringbuf<char> stringbuf;
    typedef basic_stringbuf<wchar_t> wstringbuf;
    template<class E,
        class T = char_traits<E>,
        class A = allocator<E> >
        class basic_istringstream;
    typedef basic_istringstream<char> istringstream;
    typedef basic_istringstream<wchar_t> wistringstream;
    template<class E,
        class T = char_traits<E>,
        class A = allocator<E> >
        class basic_ostringstream;
    typedef basic_ostringstream<char> ostringstream;
    typedef basic_ostringstream<wchar_t> wostringstream;
    template<class E,
        class T = char_traits<E>,
        class A = allocator<E> >
        class basic_stringstream;
    typedef basic_stringstream<char> stringstream;
    typedef basic_stringstream<wchar_t> wstringstream;
    };

Include the iostreams standard header <sstream> to define several template classes that support iostreams operations on sequences stored in an allocated array object. Such sequences are easily converted to and from objects of template class basic_string.