std::basic_streambuf::sgetn, std::basic_streambuf::xsgetn
来自cppreference.com
< cpp | io | basic streambuf
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
std::streamsize sgetn( char_type* s, std::streamsize count ); |
(1) | |
protected: virtual std::streamsize xsgetn( char_type* s, std::streamsize count ); |
(2) | |
最派生类调用
2) xsgetn(s, count)
.原文:
Calls
xsgetn(s, count)
of the most derived class.读取
count
字符输入序列,并将其存储到一个字符数组所指向的s
。如果重复调用sbumpc()
中读取的字符。也就是说,如果小于count
字符是立即可用的,该函数调用uflow()
提供更多的,直到traits::eof()返回.原文:
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.目录 |
[编辑] 参数
(无)
[编辑] 返回值
成功读取的字符数.
原文:
The number of characters successfully read.
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
调用xsputn() (公共成员函数) |