Compartir a través de


basic_streambuf::sbumpc

Reads and returns the current element, moving the stream pointer.

int_type sbumpc( );

Return Value

The current element.

Remarks

If a read position is available, the member function returns traits_type::to_int_type( *gptr) and increments the next pointer for the input buffer. Otherwise, it returns uflow.

Example

// basic_streambuf_sbumpc.cpp
// compile with: /EHsc
#include <iostream>

int main( ) 
{
   using namespace std;
   int i = 0;
   i = cin.rdbuf( )->sbumpc( );
   cout << i << endl;
}
  3

FakePre-6168bbe2788844df9c4bd9c66511196b-5cdbb4c271c14f959f9080ccb4ed9e74

Requirements

Header: <streambuf>

Namespace: std

See Also

Reference

basic_streambuf Class

iostream Programming

iostreams Conventions

Other Resources

basic_streambuf Members