std::basic_streambuf<CharT,Traits>::showmanyc (3) - Linux Manuals

std::basic_streambuf<CharT,Traits>::showmanyc: std::basic_streambuf<CharT,Traits>::showmanyc


std::basic_streambuf<CharT,Traits>::showmanyc - std::basic_streambuf<CharT,Traits>::showmanyc


virtual std::streamsize showmanyc();

Estimates the number of characters available for input in the associated character sequence. underflow() is guaranteed not to return Traits::eof() or throw an exception until at least that many characters are extracted.



Return value

The number of characters that are certainly available in the associated character sequence, or -1 if showmanyc can determine, without blocking, that no characters are available. If showmanyc returns -1, underflow() and uflow() will definitely return Traits::eof or throw.
The base class version returns 0, which has the meaning of "unsure if there are characters available in the associated sequence".


The name of this function stands for "stream: how many characters?", so it is pronounced "S how many C", rather than "show many C"


 This section is incomplete
 Reason: no example

See also

          obtains the number of characters immediately available in the get area
in_avail (public member function)

showmanyc optionally provides the number of characters available for input from the file
          (virtual protected member function of std::basic_filebuf<CharT,Traits>)