Share via


basic_stringstream::basic_stringstream

Constructs an object of type basic_stringstream.

explicit basic_stringstream( 
   ios_base::openmode _Mode = ios_base::in | ios_base::out 
); 
explicit basic_stringstream( 
   const basic_string<Elem, Tr, Alloc>& _Str, 
   ios_base::openmode _Mode = ios_base::in | ios_base::out 
);

Parameters

  • _Mode
    One of the enumerations in ios_base::openmode.

  • _Str
    An object of type basic_string.

Remarks

The first constructor initializes the base class by calling basic_iostream(sb), where sb is the stored object of class basic_stringbuf<Elem, Tr, Alloc>. It also initializes sb by calling basic_stringbuf<Elem, Tr, Alloc>(_Mode).

The second constructor initializes the base class by calling basic_iostream(sb). It also initializes sb by calling basic_stringbuf<Elem, Tr, Alloc>(_Str, _Mode).

Requirements

Header: <sstream>

Namespace: std

See Also

Reference

basic_stringstream Class

iostream Programming

iostreams Conventions