Partager via


basic_streambuf::snextc

Reads the current element and returns the following element.

int_type snextc( );

Return Value

The next element in the stream.

Remarks

The member function calls sbumpc and, if that function returns traits_type::eof, returns traits_type::eof. Otherwise, it returns sgetc.

Example

// 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-5ecc738c4996415c92c0dd4138f5873c-1be3bf704fd0402797aa08aa3880c45b

Requirements

Header: <streambuf>

Namespace: std

See Also

Reference

basic_streambuf Class

iostream Programming

iostreams Conventions

Other Resources

basic_streambuf Members