GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::basic_filebuf::showmanyc(3) C++ Standard Libary std::basic_filebuf::showmanyc(3)

std::basic_filebuf::showmanyc - std::basic_filebuf::showmanyc


protected:
virtual std::streamsize showmanyc()


If implemented, returns the number of characters left to read from the file.


(none)


The number of characters available for reading from the file, or -1 if the end of
file was reached.


This function is optional. If not implemented, this function returns 0 (since
the base class version std::basic_streambuf::showmanyc gets called)


Whether implemented or not, this function is normally called by
std::basic_streambuf::in_avail if the get area is empty.


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


implementation test to see if showmanyc() is implemented for filebuf

// Run this code


#include <fstream>
#include <iostream>


struct mybuf : std::filebuf
{
using std::filebuf::showmanyc;
};


int main()
{
mybuf fin;
fin.open("main.cpp", std::ios_base::in);
std::cout << "showmanyc() returns " << fin.showmanyc() << '\n';
}


showmanyc() returns 267


in_avail obtains the number of characters immediately available in the get area
(public member function of std::basic_streambuf<CharT,Traits>)
readsome extracts already available blocks of characters
(public member function of std::basic_istream<CharT,Traits>)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.