basic_istream::gcount

반환 중 마지막으로 서식이 지정 되지 않은 입력 문자를 읽습니다.

streamsize gcount( ) const;

반환 값

추출 횟수입니다.

설명

사용 basic_istream::get 포맷 되지 않은 문자를 읽을 수 있습니다.

예제

// 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': 1

요구 사항

헤더: <istream>

네임 스페이스: std

참고 항목

참조

basic_istream Class

iostream 프로그래밍

iostreams 규칙