Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the number of characters read during the last unformatted input.
streamsize gcount( ) const;
Return Value
The extraction count.
Remarks
Use basic_istream::get to read unformatted characters.
Example
// basic_istream_gcount.cpp
// compile with: /EHsc
#include <iostream>
using namespace std;
int main( )
{
cout << "Type the letter 'a': ";
ws( cin );
char c[10];
cin.get( &c[0],9 );
cout << c << endl;
cout << cin.gcount( ) << endl;
}
a
FakePre-88f6084c09d84baeb9d671c2b42fc24b-ac39a7c3f83e407dbdf0ce7d414ceecb
Requirements
Header: <istream>
Namespace: std