다음을 통해 공유


basic_istream::gcount

Returns the number of characters read during the last unformatted input.

streamsize gcount( ) const;

반환 값

The extraction count.

설명

Use basic_istream::get to read unformatted characters.

예제

// 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-f13f77a0633d4c1185da25a7b52e398b-59214e7fed754746a8f3a7017d96b243

요구 사항

Header: <istream>

네임스페이스: std

참고 항목

참조

basic_istream 클래스

iostream 프로그래밍

iostreams 규칙