에 노력하고 부분. 그러나 get()
방법은 아닙니다. get()
회원은 헤더에서 찾을 수있는 basic_istream<_Elem, _Traits>
템플릿에서 상속됩니다. 다음은 VS2005 설치의 구현입니다.
int_type __CLR_OR_THIS_CALL get()
{ // extract a metacharacter
int_type _Meta = 0;
ios_base::iostate _State = ios_base::goodbit;
_Chcount = 0;
const sentry _Ok(*this, true);
if (!_Ok)
_Meta = _Traits::eof(); // state not okay, return EOF
else
{ // state okay, extract a character
_TRY_IO_BEGIN
_Meta = _Myios::rdbuf()->sbumpc();
if (_Traits::eq_int_type(_Traits::eof(), _Meta))
_State |= ios_base::eofbit | ios_base::failbit; // end of file
else
++_Chcount; // got a character, count it
_CATCH_IO_END
}
_Myios::setstate(_State);
return (_Meta);
}