|
stringstream::strpublic member function
string str ( ) const; void str ( const string & s ); Get/set the associated string object The first version returns a copy of the string object currently associated with the string stream buffer.The second syntax copies the content of string s to the string object associated with the string stream buffer. The function effectivelly calls rdbuf()->str(). Notice that setting a new string does not clear the error flags currently set in the stream object unless the member function clear is explicitly called. Parameters
Return ValueThe first version returns a copy of the string object currently associated with the stream buffer.Example
Basic template member declaration( basic_stringstream<charT,traits,Allocator> )
See also
|