Returns the number of characters available to read. This value depends on whether there are read positions directly available at the get pointer (gptr):

If the get pointer (gptr) has a value and this is less than the end pointer (egptr): The function returns the number of characters directly available at the get pointer before the end pointer (i.e., it returns (egptr()-gptr()) without calling any virtual member function).

If the get pointer (gptr) is either null or has reached the end pointer (egptr): The function calls the protected virtual member function showmanyc to obtain the number of characters expected to be available after an underflow.

Parameters

none

Return Value

The number of characters available to read.
A value of -1 (obtained from showmanyc) represents that no further characters are expected to be available.streamsize is a signed integral type.