Compartilhar via


basic_filebuf::underflow

Extracts the current element from the input stream.

virtual int_type underflow( );

Return Value

If the function cannot succeed, it returns traits_type::eof. Otherwise, it returns ch, converted as described in the Remarks section.

Remarks

The protected virtual member function endeavors to extract the current element ch from the input stream, and return the element as traits_type::to_int_type(ch). It can do so in various ways:

  • If a read position is available, it takes ch as the element stored in the read position and advances the next pointer for the input buffer.

  • It can read one or more elements of type char*,* as if by successive calls of the form fgetc(fp), and convert them to an element ch of type Elem by using the file conversion facet fac to call fac.in as needed. If any read or conversion fails, the function does not succeed.

Requirements

Header: <fstream>

Namespace: std

See Also

Reference

basic_filebuf Class

iostream Programming

iostreams Conventions

Other Resources

basic_filebuf Members