std::basic_streambuf::sgetn, std::basic_streambuf::xsgetn - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::basic_streambuf::sgetn, std::basic_streambuf::xsgetn

From cppreference.com
< cpp‎ | io‎ | basic streambuf

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

1) Calls `xsgetn(s, count)` of the most derived class.
2) Reads `count` characters 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 `count` characters are immediately available, the function calls uflow() to provide more until traits::eof() is returned.

### [edit] Parameters

(none)

### [edit] Return value

The number of characters successfully read.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

sputn | invokes xsputn() (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_streambuf/sgetn&oldid=64238"
Category:

- Todo no example