std::basic_streambuf<CharT,Traits>::sgetc
提供: cppreference.com
<tbody>
</tbody>
int_type sgetc(); |
||
入力シーケンスから1文字読み込みます。
入力シーケンスの読み込み位置が利用可能でなければ underflow() を返します。 そうでなければ Traits::to_int_type(*gptr()) を返します。
引数
(なし)
戻り値
get ポインタの指す文字の値。
例
Run this code
#include <iostream>
#include <sstream>
int main()
{
std::stringstream stream("Hello, world");
std::cout << "sgetc() returned '" << (char)stream.rdbuf()->sgetc() << "'\n";
std