Go backward to Input Position.
Go up to Istream.
Miscellaneous `istream' utilities
---------------------------------
Use these methods for housekeeping on `istream' objects:
- Method: int istream::gcount ()
Report how many characters were read from this `istream' in the
last unformatted input operation.
- Method: int istream::ipfx (int KEEPWHITE)
Ensure that the `istream' object is ready for reading; check for
errors and end of file and flush any tied stream. `ipfx' skips
whitespace if you specify `0' as the KEEPWHITE argument, *and*
`ios::skipws' is set for this stream.
To avoid skipping whitespace (regardless of the `skipws' setting on
the stream), use `1' as the argument.
Call `istream::ipfx' to simplify writing your own methods for
reading `istream' objects.
- Method: void istream::isfx ()
A placeholder for compliance with the draft ANSI standard; this
method does nothing whatever.
If you wish to write portable standard-conforming code on `istream'
objects, call `isfx' after any operation that reads from an
`istream'; if `istream::ipfx' has any special effects that must be
cancelled when done, `istream::isfx' will cancel them.
- Method: istream& istream::ignore ([int N] [, int DELIM])
Discard some number of characters pending input. The first
optional argument N specifies how many characters to skip. The
second optional argument DELIM specifies a "boundary" character:
`ignore' returns immediately if this character appears in the
input.
By default, DELIM is `EOF'; that is, if you do not specify a
second argument, only the count N restricts how much to ignore
(while input is still available).
If you do not specify how many characters to ignore, `ignore'
returns after discarding only one character.
- Method: istream& istream::putback (char CH)
Attempts to back up one character, replacing the character
backed-up over by CH. Returns `EOF' if this is not allowed.
Putting back the most recently read character is always allowed.
(This method corresponds to the C function `ungetc'.)
- Method: istream& istream::unget ()
Attempt to back up one character.