String streams can take a string, provided either as an argument to the constructor, or set later through the str(const basic_string <charT, traits, Allocator>&) function. This string is copied into an internal buffer, and serves as source or sink of characters to subsequent insertions or extractions. Each time the string is retrieved through the str() function, a copy of the internal buffer is created and returned.
Output string streams are dynamic.12 The internal buffer is allocated once an output string stream is constructed. The buffer is automatically extended during insertion each time the internal buffer is full.
Input string streams are always static. You can extract as many items as are available in the string you provided the string stream.
OEM Edition, ©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.