description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|
Learn more about: istrstream Class |
istrstream Class |
11/04/2016 |
|
|
c2d41c75-bd2c-4437-bd77-5939ce1b97af |
Describes an object that controls extraction of elements and encoded objects from a stream buffer of class strstreambuf.
class istrstream : public istream
The object stores an object of class strstreambuf
.
Note
This class is deprecated. Consider using istringstream or wistringstream instead.
Constructor | Description |
---|---|
istrstream | Constructs an object of type istrstream . |
Member function | Description |
---|---|
rdbuf | Returns a pointer to the stream's associated strstreambuf object. |
str | Calls freeze, and then returns a pointer to the beginning of the controlled sequence. |
Header: <strstream>
Namespace: std
Constructs an object of type istrstream
.
explicit istrstream(
const char* ptr);
explicit istrstream(
char* ptr);
istrstream(
const char* ptr,
streamsize count);
istrstream(
char* ptr,
int count);
count
The length of the buffer (ptr).
ptr
The contents with which the buffer is initialized.
All the constructors initialize the base class by calling istream(sb), where sb
is the stored object of class strstreambuf. The first two constructors also initialize sb
by calling strstreambuf( ( const char *) ptr, 0 )
. The remaining two constructors instead call strstreambuf( ( const char *) ptr, count )
.
Returns a pointer to the stream's associated strstreambuf object.
strstreambuf *rdbuf() const
A pointer to the stream's associated strstreambuf object.
The member function returns the address of the stored stream buffer, of type pointer to strstreambuf.
See strstreambuf::pcount for a sample that uses rdbuf
.
Calls freeze, and then returns a pointer to the beginning of the controlled sequence.
char *str();
A pointer to the beginning of the controlled sequence.
The member function returns rdbuf -> str.
See strstream::str for a sample that uses str
.
istream
Thread Safety in the C++ Standard Library
iostream Programming
iostreams Conventions