basic_stringstream
stringstream
wstringstream
Input/output string stream class
iostream library
  cplusplus.com  

Standard hierarchy

ios_base
--->
ios
--->
istream
--->
iostream
--->
stringstream
  --->
ostream
--->  

Public member functions:

stringstream members:
(constructor)Construct an object and optionally initizalize string content.
rdbufGet the stringbuf object associated with the stream.
strGet/set string value.
members inherited from istream:
operator>>Performs a formatted input operation (extraction)
gcountGet number of characters extracted by last unformatted input operation
getExtract unformatted data from stream
getlineGet a line from stream
ignoreExtract and discard characters
peekPeek next character
readRead a block of data
readsomeRead a block of data
putbackPut the last character back to stream
ungetMake last character got from stream available again
tellgGet position of the get pointer
seekgSet position of the get pointer
syncSyncronize stream's buffer with source of characters
members inherited from ostream:
operator<<Perform a formatted output operation (insertion).
flushFlush buffer.
putPut a single character into output stream.
seekpSet position of put pointer.
tellpGet position of put pointer.
writeWrite a sequence of characters.
members inherited from ios:
operator void *Convert stream to pointer.
operator !evaluate stream object.
badCheck if an unrecoverable error has occurred.
clearSet control states.
copyfmtCopy formatting information.
eofCheck if End-Of-File has been reached.
exceptionsGet/set the exception mask.
failCheck if failure has occurred.
fillGet/set the fill character.
goodCheck if stream is good for i/o operations.
imbueImbue locale.
narrowNarrow character.
rdbufGet/set the associated streambuf object.
rdstateGet control state.
setstateSet control state.
tieGet/set the tied stream.
widenWiden character.
members inherited from ios_base:
flagsGet/set format flags.
getlocGet current locale.
imbueImbue locale.
iwordGet reference to a long element of the internal extensible array.
precisionGet/set floating-point decimal presision.
pwordGet reference to a void* element of the internal extensible array.
register_callbackRegister event callback function.
setfSet some format flags.
sync_with_stdioActivates / Deactivates synchronization with cstdio functions. [static]
unsetfClear format flag.
widthGet/set field width.
xallocReturn a new index for the internal extensible array. [static]

Description

  stringstream class provides an interface to manipulate strings as if they were input/output streams.
  The objects of this class mantain internally a pointer to a stringbuf object that can be obtained/modified by calling member rdbuf. This streambuf-derived object stores a sequence of characters (string) that can be obtained/modified by calling member str.


© The C++ Resources Network, 2001