std::basic_istream::readsome
De cppreference.com
< cpp | io | basic istream
![]() | Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate. La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
std::streamsize readsome( char_type* s, std::streamsize count ); | ||
Extrae caracteres de disponibilidad inmediata de la corriente de entrada .
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.
Se comporta como
UnformattedInputFunction
. Después de la construcción y comprobación del objeto centinela 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.
Si rdbuf()->in_avail()==-1, llama setstate(eofbit) y extrae sin caracteres .
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.
Si rdbuf()->in_avail()==0, extrae sin caracteres .
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.
Si rdbuf()->in_avail()>0, extractos std::min(rdbuf()->in_avail(), count)) caracteres y los almacena en posiciones sucesivas de la matriz characater cuyo primer elemento es apuntado por
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.
Contenido |
[editar]Notas
El comportamiento de esta función es muy específica de la implementación. Por ejemplo, cuando se utiliza con std::ifstream, algunos compiladores llenar el filebuf subyacente con datos tan pronto como se abre el archivo (y readsome () en compiladores tales lee datos, potencialmente, pero no necesariamente, el archivo completo), mientras que otros compiladores sólo lectura desde el archivo cuando una operación de entrada actual se solicita (y readsome () emitida después de la apertura del archivo no extrae ningún carácter). Del mismo modo, una llamada a std::cin.readsome() puede devolver todas las entradas pendientes consola sin procesar, o siempre puede devolver cero y extraer sin caracteres .
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.
[editar]Parámetros
s | - | puntero a la matriz de caracteres para almacenar los caracteres a 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 | - | número máximo de caracteres a leer 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. |
[editar]Valor de retorno
número de caracteres que realmente se extrajo .
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.
[editar]Ejemplo
Esta sección está incompleta Razón: sin ejemplo |
[editar]Ver también
extrae los bloques de caracteres 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. (función miembro pública) |