basic_streambuf::snextc

현재 요소를 읽고 다음 요소를 반환 합니다.

int_type snextc( );

반환 값

스트림의 다음 요소입니다.

설명

멤버 함수 호출 sbumpc 및 해당 함수에서 반환 하는 경우 traits_type::eof, 반환 traits_type::eof.그렇지 않으면, sgetc.

예제

// basic_streambuf_snextc.cpp
// compile with: /EHsc
#include <iostream>
int main( ) 
{
   using namespace std;
   int i = 0;
   i = cin.rdbuf( )->snextc( );
   // cout << ( int )char_traits<char>::eof << endl;
   cout << i << endl;
}
  aa
  aa
97

요구 사항

헤더: <streambuf>

네임 스페이스: std

참고 항목

참조

basic_streambuf Class

iostream 프로그래밍

iostreams 규칙