名前空間
変種
操作

std::basic_istream::unget

提供: cppreference.com
< cpp‎ | io‎ | basic istream

 
 
 
std::basic_istream
グローバルオブジェクト
Original:
Global objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
書式付き入力
Original:
Formatted input
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
書式なし入力
Original:
Unformatted input
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istream::unget
ポジショニング
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
その他
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
メンバークラス
Original:
Member classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
非メンバ関数
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
basic_istream& unget();
再び、最近、抽出された文字を利用できるようになり.
Original:
Makes the most recently extracted character available again.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
最初はeofbitクリアし、その後UnformattedInputFunctionとして動作します。監視オブジェクトを構築し、確認した後、rdbuf()->sungetc()呼び出し.
Original:
First clears eofbit, then behaves as UnformattedInputFunction. After constructing and checking the sentry object, calls rdbuf()->sungetc().
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rdbuf()->sungetc()戻りTraits::eof()setstate(badbit)呼び出す場合.
Original:
If rdbuf()->sungetc() returns Traits::eof(), calls setstate(badbit).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
いずれにせよ、gcount()はカウンタをゼロに設定します。.
Original:
In any case, sets the gcount() counter to zero.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] パラメータ

(なし)

[編集] 値を返します

*this

[編集]

#include <sstream>
#include <iostream>
int main()
{
    std::istringstream s1("Hello, world.");
    char c1 = s1.get();
    if(s1.unget())
    {
        char c2 = s1.get();
        std::cout << "Got: " << c1 << " got again: " << c2 << '\n';
    }
}

出力:

Got: H got again: H

[編集] 参照

文字を抽出します
Original:
extracts characters
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
文字を抽出せずに読み込みます
Original:
reads the next character without extracting it
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
入力ストリームに文字を入れます
Original:
puts character into input stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]