std::basic_filebuf::showmanyc
Da cppreference.com.
< cpp | io | basic filebuf
![]() | 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. |
protected: virtualstd::streamsize showmanyc() | ||
Se attuata, restituisce il numero di caratteri a sinistra per leggere dal file.
Original:
If implemented, returns the number of characters left to read from the file.
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]Parametri
(Nessuno)
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.
[modifica]Valore di ritorno
Il numero di caratteri disponibili per la lettura dal file, o -1 se il fine del file è stato raggiunto.
Original:
The number of characters available for reading from the file, or -1 if the end of file was reached.
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]Note
Questa funzione è opzionale. Se non implementato, questa funzione restituisce 0 (poiché la classe std::basic_streambuf::showmanyc versione base viene chiamato)
Original:
This function is optional. If not implemented, this function returns 0 (since the base class version std::basic_streambuf::showmanyc gets called)
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.
Che sia implementata o no, questa funzione è normalmente chiamato dal std::basic_streambuf::in_avail se l'area get è vuoto.
Original:
Whether implemented or not, this function is normally called by std::basic_streambuf::in_avail if the get area is empty.
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
Il test di implementazione per vedere se showmanyc () è implementato per filebuf
Original:
implementation test to see if showmanyc() is implemented for filebuf
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.
#include <fstream>#include <iostream> struct mybuf :std::filebuf{using std::filebuf::showmanyc;}; int main(){ mybuf fin; fin.open("test.in", std::ios_base::in);std::cout<<"showmanyc() returns "<< fin.showmanyc()<<'\n';}
Output:
showmanyc() returns 6626
[modifica]Vedi anche
ottiene il numero di caratteri immediatamente disponibili nella zona get Original: obtains the number of characters immediately available in the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) | |
estrae blocchi già disponibili di caratteri Original: extracts already available 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) |