std::basic_istream::unget
Aus cppreference.com
< cpp | io | basic istream
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
basic_istream& unget(); |
||
Macht die zuletzt extrahierte Zeichenfolge wieder verfügbar .
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.
You can help to correct and verify the translation. Click here for instructions.
Zuerst löscht eofbit verhält sich dann wie
UnformattedInputFunction
. Nach dem Bau und Prüfung der Schildwache Objekt, ruft 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.
You can help to correct and verify the translation. Click here for instructions.
Wenn rdbuf()->sungetc() kehrt Traits::eof(), ruft 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.
You can help to correct and verify the translation. Click here for instructions.
In jedem Fall setzt den Zähler auf Null
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.
You can help to correct and verify the translation. Click here for instructions.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Rückgabewert
*this
[Bearbeiten] Beispiel
#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'; } }
Output:
Got: H got again: H
[Bearbeiten] Siehe auch
Extrahiere Zeichen (öffentliche Elementfunktion) | |
liest das nächste Zeichen ohne es zu extrahieren 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. (öffentliche Elementfunktion) | |
setzt Zeichen in Input-Stream 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. (öffentliche Elementfunktion) |