std::basic_streambuf<CharT,Traits>::sgetn, std::basic_streambuf<CharT,Traits>::xsgetn

  1. Calls xsgetn(s, count) of the most derived class.

# Declarations

std::streamsize sgetn( char_type* s, std::streamsize count );
protected:
virtual std::streamsize xsgetn( char_type* s, std::streamsize count );

# Parameters

# Return value

The number of characters successfully read. If it is less than count the input sequence has reached the end.

# Notes

The rule about “more efficient implementations” permits bulk I/O without intermediate buffering: that’s how std::ifstream::read simply passes the pointer to the POSIX read() system call in some implementations of iostreams

# Example

This section is incompleteReason: no example

# See also