Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
IOstream Library
manipulators
classes:
filebuf
fstream
ifstream
ios
iostream
ios_base
istream
istringstream
ofstream
ostream
ostringstream
streambuf
stringbuf
stringstream
objects:
cerr
cin
clog
cout
types:
fpos
streamoff
streampos
streamsize
istream
istream::istream
istream::~istream
member classes:
istream::sentry
member functions:
istream::gcount
istream::get
istream::getline
istream::ignore
istream::operator>>
istream::peek
istream::putback
istream::read
istream::readsome
istream::seekg
istream::sync
istream::tellg
istream::unget


istream::gcount

public member function
streamsize  gcount ( ) const;

Get number of characters extracted by last unformatted input operation

Returns the number of characters extracted by the last unformatted input operation performed on the object.

The unformatted input operations that modify the value returned by this function are those performed by the following member functions: get, getline, ignore, peek, read, readsome, putback and unget.

Notice though, that peek, putback and unget do not extract characters. So gcount will always return zero after a call to any of these.

Parameters

none

Return Value

An integer value of type streamsize with the number of characters extracted by the last unformatted input operation.

Basic template member declaration

( basic_istream<charT,traits> )
 
streamsize gcount () const;


See also