std::basic_istream::readsome
Da cppreference.com.
< cpp | io | basic istream
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
std::streamsize readsome( char_type* s, std::streamsize count ); |
||
Estrae i caratteri immediatamente disponibile dal flusso di input.
Original:
Extracts immediately available characters from the input stream.
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.
Si comporta come
UnformattedInputFunction
. Dopo la costruzione e la verifica dell'oggetto sentinella, Original:
Behaves as
UnformattedInputFunction
. After constructing and checking the sentry object, 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.
Se rdbuf()->in_avail() == -1, chiama setstate(eofbit) ed estrae nessun carattere.
Original:
If rdbuf()->in_avail() == -1, calls setstate(eofbit) and extracts no characters.
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.
Se rdbuf()->in_avail() == 0, estrae nessun carattere.
Original:
If rdbuf()->in_avail() == 0, extracts no characters.
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.
Se rdbuf()->in_avail() > 0, estratti std::min(rdbuf()->in_avail(), count)) personaggi e li memorizza in posizioni successive della matrice characater il cui primo elemento è puntato da
s
.Original:
If rdbuf()->in_avail() > 0, extracts std::min(rdbuf()->in_avail(), count)) characters and stores them into successive locations of the characater array whose first element is pointed to by
s
.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.
Indice |
[modifica] Note
Il comportamento di questa funzione è altamente specifica dell'implementazione. Ad esempio, quando viene utilizzato con std::ifstream, alcuni compilatori riempire il filebuf sottostante con i dati appena il file viene aperto (e readsome () su tali compilatori legge dati, potenzialmente, ma non necessariamente, l'intero file), mentre altri compilatori leggere solo da file quando un'operazione di ingresso effettivo è richiesto (e readsome (), rilasciati dopo l'apertura del file non estrae i caratteri). Allo stesso modo, una chiamata a std::cin.readsome() può restituire tutti gli input in attesa console allo stato naturale, o può sempre restituire zero ed estrarre nessun carattere.
Original:
The behavior of this function is highly implementation-specific. For example, when used with std::ifstream, some compilers fill the underlying filebuf with data as soon as the file is opened (and readsome() on such compilers reads data, potentially, but not necessarily, the entire file), while other compilers only read from file when an actual input operation is requested (and readsome() issued after file opening never extracts any characters). Likewise, a call to std::cin.readsome() may return all pending unprocessed console input, or may always return zero and extract no characters.
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.
[modifica] Parametri
s | - | puntatore alla matrice di caratteri per memorizzare i caratteri
Original: pointer to the character array to store the characters to The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
count | - | numero massimo di caratteri da leggere
Original: maximum number of characters to read The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifica] Valore di ritorno
numero di caratteri effettivamente estratto.
Original:
number of characters actually extracted.
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.
[modifica] Esempio
This section is incomplete Reason: no example |
[modifica] Vedi anche
estrae blocchi di caratteri Original: extracts blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) |