std::streamsize sgetn( char_type* s, std::streamsize count );
protected: virtual std::streamsize xsgetn( char_type* s, std::streamsize count );
xsgetn(s, count)of the most derived class.
countcharacters from the input sequence and stores them into a character array pointed to by
s. The characters are read as if by repeated calls to
sbumpc(). That is, if less than
countcharacters are immediately available, the function calls
uflow()to provide more until
std::basic_streambufare permitted to provide more efficient implementations of this function.
|s||-||pointer to the beginning of a char_type array|
|count||-||maximum number of characters to write|
The number of characters successfully read. If it is less than
count the input sequence has reached the end.
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.
(public member function)
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.