<metanoindex/>
<tbody> </tbody> int_type peek(); |
||
Verhält sich wie
UnformattedInputFunction. Nach dem Bau und Test der Wache Objekt, liest das nächste Zeichen aus dem Eingabestrom ohne es zu extrahieren . Original:
Behaves as
UnformattedInputFunction. After constructing and testing the sentry object, reads the next character from the input stream 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.
You can help to correct and verify the translation. Click here for instructions.
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.
Rückgabewert
Wenn
good() == true, gibt das nächste Zeichen von rdbuf()->sgetc() erhaltenOriginal:
If
good() == true, returns the next character as obtained by rdbuf()->sgetc()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.
Ansonsten kehrt
Traits::eof() .Original:
Otherwise, returns
Traits::eof().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.
Beispiel
#include <sstream>
#include <iostream>
int main()
{
std::istringstream s1("Hello, world.");
char c1 = s1.peek();
char c2 = s1.get();
std::cout << "Peeked: " << c1 << " got: " << c2 << '\n';
}
Output:
Peeked: H got: H
Siehe auch
}| Extrahiere Zeichen (öffentliche Elementfunktion) | |
unextracts ein Zeichen Original: unextracts a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (öffentliche Elementfunktion) | |