The Microsoft Input/Output Stream Classes (iostream.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
istream::get
◄istream► ◄Up► ◄Contents► ◄Index► ◄Back►
──The Microsoft iostream Classes────────────────────────────────────────────
int get();
istream& get( char* pch, int nCount, char delim = '\n' );
istream& get( unsigned char* puch, int nCount, char delim = '\n' );
istream& get( signed char* psch, int nCount, char delim = '\n' );
istream& get( char& rch );
istream& get( unsigned char& ruch );
istream& get( signed char& rsch );
istream& get( streambuf& rsb, char delim = '\n' );
Parameter Description
<pch>, <puch>, <psch>
A pointer to a character array.
<nCount> The maximum number of characters to store, including
the terminating NULL.
<delim> The delimiter character (defaults to newline).
<rch>, <ruch>, <rsch>
A reference to a character.
<rsb> A reference to an object of a streambuf-derived
class.
Remarks
These functions extract data from an input stream as follows:
Variation Description
get(); Extracts a single character from the stream
and returns it.
get( char*, int, char ); Extracts characters from the stream until
either <delim> is found, the limit <nCount>
is reached, or the end of file is reached.
The characters are stored in the array
followed by a null terminator.
get( char& ); Extracts a single character from the stream
and stores it as specified by the reference
argument.
get( streambuf&, char ); Gets characters from the stream and stores
them in a streambuf object until the
delimiter is found or the end of the file is
reached. The ios::failbit flag is set if the
streambuf output operation fails.
In all cases, the delimiter is neither extracted from the stream nor
returned by the function. The getline function, in contrast, extracts
the delimiter but does not store it.
See Also
◄istream::getline►, ◄istream::read►, ◄istream::ignore►,
◄istream::gcount►
-♦-