public member function
<fstream>

std::basic_filebuf::showmanyc

streamsize showmanyc();
Get number of characters available
Returns an estimate on the number of characters available in the associated file.

This function is expected to return zero (providing no information), but library implementations may instead provide information on the possible behavior of future calls to the protected member functions underflow and uflow:
return valuedescriptionexpected behavior for underflow and uflow
>0characters known to be availableSuccessive calls will succeed in retrieving characters until at least as many characters as the value returned have been extracted.
0no informationFurther calls may either retrieve more characters or return traits_type::eof().
-1sequence unavailableFurther calls will fail (either throwing or returning "immediately").

This virtual member function overrides the inherited member basic_streambuf::showmanyc, called by member in_avail when there are no read positions available at the get pointer (gptr).

Parameters

none

Return Value

Returns zero (if no information is provided).
Library implementations may return a different value to provide additional information.
streamsize is a signed integral type.

Data races

Unspecified.

Exception safety

Basic guarantee: if an exception is thrown, the file stream buffer is in a valid state.

See also