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
FakePre-da6ad1d3e5c54d948876b2060f2d8b4c-2a857cd599c54dcf857868591cff28ae
要求
标头: <streambuf>
命名空间: std