protected virtual member function
<streambuf> <iostream>

std::basic_streambuf::showmanyc

streamsize showmanyc();
Get number of characters available
Virtual function (to be read s-how-many-c) called by other member functions to get an estimate on the number of characters available in the associated input sequence.

It is called by public member function basic_streambuf::in_avail when there are no read positions available at the get pointer (gptr).

The return value provides information on the possible behavior of 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").

Its default behavior in basic_streambuf is to always return zero. basic_filebuf overrides this member function (see basic_filebuf::showmanyc).

Parameters

none

Return Value

Returns zero.
streamsize is a signed integral type.

Data races

Introduces no data races, but overriden versions in derived classes may.

Exception safety

No-throw guarantee: this default definition never throws exceptions.

See also